fix encoding problems. internal: unicode. external: utf-8