Implementing unicode support for encoding strings sent to the server