I am working on a UDP based client application. I have been facing the issue of Unicode(UTF - 8) conversation. I did convert decimal to Utf - 8 it was not given proper output. I got output like(À). if I send this output through UDP Client. The output is changed by(Ã). Why it was happing. Even those hex values also changed by C0 to C3.could anyone has to answer me? how to send Unicode in UDP communication?
const dgram = require('dgram');
const client = dgram.createSocket('udp4');
const HOST = '192.168.43.232';
const PORT = 5000;
const message = String.fromCharCode(192);
console.log(message); //<À>
client.send(message, 0, message.length, PORT, HOST, (err) => {
if (err) throw err;
console.log('UDP message sent to ' + message + ' ' + HOST + ':' + PORT); //UDP message sent to À
192.168.43.232:5000
client.close();
});