Minor tidy up to remove repeat code.

It seems tidier to only look up settings.DEFAULT_CHARSET
the once while setting encoding rather than doing it when setting
the encoding in the __init__ and also when fetching the encoding
using the property.