Add 'encoding' option to allow overriding server encoding

I needed to change the `encoding` to `ISO-8859-1` and found no way to do it from the configuration so I added the option. Please tell me if there's a better way to do this or if its useful as I coded it.