Made charset optional

Some installs don't have it.