fix mixed encoding whitespace