This post works great for escaped unicode with 6 characters (e.g. \u00252F), but it doesn't work for escaped unicode with 5 characters (e.g. \u0000S). When I put both of these examples in this unicode converter, they both decode fine. I'm not sure what the difference is between the 5 and 6 character codes.
Asked
Active
Viewed 706 times
0
-
4There are no unicode escapings with 5 characters. It's `\u0025`+`2F`, which translates to `%2F`, which you can URI-decode to `/`. That's what the answer you linked does. `\u0000S` is totally nonsensical, a [NUL](https://en.wikipedia.org/wiki/Null_character) followed by `S`. – Bergi Nov 11 '15 at 17:32
-
Thanks for the explanation! Now I see my folly and realize that the ajax response a bunch of \u0000 (null) codes embedded for no apparent reason. Now that I know this, I can just strip those out. Thanks again. – Andrew Nov 11 '15 at 20:28
-
1Also, if that AJAX service is returning the data in JSON format, then use a JSON parser, which will automatically handle any escaped characters. – roeland Nov 11 '15 at 21:26
1 Answers
0
Posting Bergis answer here:
There are no unicode escapings with 5 characters. It's \u0025+2F, which translates to %2F, which you can URI-decode to /. That's what the answer you linked does. \u0000S is totally nonsensical, a NULL followed by S

Andrew
- 2,368
- 1
- 23
- 30