fix character encoding to match document