JavaScript: create a string or char from an UTF-8 value
问题 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) !! 回答1: I think this will do what you want: function convertHexToString