I got a string witch contains unicode sequence like "\u00c3\u00a7" witch should be displayed like "ç" but i got this "ç"
The data come from an export from Facebook in Json.
There is a related post for this subject (Facebook JSON badly encoded) and i tried to encode/decode with iconv, but without success!
Thank you !
Encode/Decode from/to latin1 to utf8:
iconv.decode(iconv.encode(str, 'latin1'), 'utf8');
Replace \u...:
str.replace(/\\u([\d\w]{4})/gi, function (match, grp) {
return String.fromCharCode(parseInt(grp, 16));
});
I also tried with encodeURIComponent:
encodeURIComponent(stringWithUnicode);