character encoding fixes