jeudi 19 mars 2015

Should I use UTF-8 to send data over the network?


WinAPI uses UTF-16LE encoding, so if I called some WinAPI function that returns a string, it will return it as UTF-16LE encoded.


So I'm thinking of using UTF-16LE encoding for strings in my program, and when it's time to send the data over the network, I convert it to UTF-8, and on the other side I convert it back to UTF-16LE. This is so there is less amount of data to send.


Is there's a reason why I shouldn't do that?




Aucun commentaire:

Enregistrer un commentaire