make charset configurable