Advertisement
jraavis

Unicode to Text

Mar 3rd, 2019
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function unicodeToChar(text) {
  2.    return text.replace(/\\u[\dA-F]{4}/gi,
  3.           function (match) {
  4.                return String.fromCharCode(parseInt(match.replace(/\\u/g, ''), 16));
  5.           });
  6. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement