Tuesday 16 May 2017

Unescape a string in NodeJS

I have an input which is: %u05D0%u05DC%20%u05E2%u05DC

When I run the built-in browser function (on the console for example): unescape("%u05D0%u05DC%20%u05E2%u05DC")

The result is: "אל על"

When I run the same thing in NodeJS using the unescape module, the returned string is the same as original. Also tried to use the querystring.unescape function, but the same result.

Is there a way to imitate the same decoding functionality I got from the browser in a NodeJS application?

Thanks!



via Daniel Golub

No comments:

Post a Comment