Make character encoding more configurable