I have the following string in NodeJS:
'3ª Jornada: Resumen 2'
which should be shown as:
'3ª Jornada: Resumen 2'
I have been trying to convert it to another
decodeURIComponent(escape(myString))
but it did not work.
Any ideas?
According to this code snippet, I finally managed to do it in the following way:
myString = myString.replace(/&#(x[0-9A-Fa-f]{2});/g, function(match, hex) {
return String.fromCharCode('0' + hex);
});