1

I get this type of coded message from a .net webservice that I need that I need to decode in javascript, any idea what type it is?

\u05d8\u05d9\u05d5\u05d8\u05d0
Avi Zloof
  • 2,923
  • 4
  • 22
  • 28

2 Answers2

1

These are the Unicode representations of Hebrew characters.

Try this :-

var x = "\u05d8\u05d9\u05d5\u05d8\u05d0";
var r = /\\u([\d\w]{4})/gi;
x = x.replace(r, function (match, grp) {
    return String.fromCharCode(parseInt(grp, 16)); } );
x = unescape(x);
console.log(x);

You can see the corresponding Hebrew text in the console.

Jose Francis
  • 950
  • 13
  • 28
0

\u05d8\u05d9\u05d5\u05d8\u05d0

this is "unicode-escape-sequence" in dotnet and above code is some uniode characters.

To know more about dotnet unicode escape sequence please refer below link.

https://msdn.microsoft.com/en-us/library/aa664669(v=vs.71).aspx

There is some recommended way of decoding unicode characters in javascript.Please refer below link

http://ecmanaut.blogspot.ca/2006/07/encoding-decoding-utf8-in-javascript.html

Pavan Chandaka
  • 11,671
  • 5
  • 26
  • 34