[Server] Fix encoding problems for Unicode