Add support for configuring character encoding