NodeJS Express encodes the URL - how to decode : <p>I'm using NodeJS with Express, and when I use foreign characters in the URL, they automatically get encoded.</p>

<p><strong>How do I decode it back to the original string?</strong></p>

<p>Before calling NodeJS, I escape characters.</p>

<p>So the string: <code>אובמה</code></p>

<p>Becomes <code>%u05D0%u05D5%u05D1%u05DE%u05D4</code></p>

<p>The entire URL now looks like: <code>http://localhost:32323/?query=%u05D0%u05D5%u05D1%u05DE%u05D4</code></p>

<p>Now in my NodeJS, I get the escaped string <code>%u05D0%u05D5%u05D1%u05DE%u05D4</code>.</p>

<p>This is the relevant code:</p>

<pre><code>var url_parts = url.parse(req.url, true);
var params = url_parts.query;
var query = params.query; // '%u05D0%u05D5%u05D1%u05DE%u05D4'
</code></pre>

<p>I've tried <code>url</code> and <code>querystring</code> libraries but nothing seems to fit my case.</p>

<pre><code>querystring.unescape(query); // still '%u05D0%u05D5%u05D1%u05DE%u05D4'
</code></pre>
