I am making a chat application and I can manage to send messages in Unicode from the clients, but if I write an instruction in the server code (nodejs script with net framework), for example attaching the nick of the sender to the message, it makes the message garbled.
Example: sockets[i].write(socket.id + ": " + msg_sent);
If msg_sent is in ASCII (encoded as ascii in the client), it works fine, but if I encode it as Unicode, the instruction makes the message unreadable.
Thanks in advance for the help.