fixed encoding problems with client/server

Wrapped sockets input and output streams so that now both use UTF-8