Same question as this, but with UTF-8 instead of ASCII
In JavaScript, how can you get a string representation of a UTF-8 value?
e.g. how to turn "c385" into "Å" ?
or how to turn "E28093" into "—" (m dash) ?
or how to turn "E282AC" into "€" (euro sign) ?
My question is NOT a duplicate of Hex2Asc. You can see for yourself: hex2a("E282AC") will transform the string into "â¬" instead of transforming it into "€" (euro sign) !!
I think this will do what you want:
DEMO
Credits:
you have to use
c5
, notc3 85
ref: http://rishida.net/tools/conversion/Lear more about code point and code unit