title: Decoding non English letters in URL (javascript)
body: <p>I get in my html file parameter with some text containing non-english characters.
  Like that: <a href="http://www.example.com/player.html?name=%e4%e1%ef" rel="nofollow noreferrer">http://www.example.com/player.html?name=%e4%e1%ef</a></p>
  
  <p>I need to decode this to name=הבן</p>
  
  <p>I tryed:</p>
  
  <pre><code>unescape(url) - get wrong characters: name=äáï (maybe from another charset)
  //and
  decodeURIComponent(url) - get Malformed URI exception
  // even found some solutions like
  decodeURIComponent((url+'').replace(/\+/g, '%20')) - exception too
  </code></pre>
  
  <p>Any solution for that? How to decode using correct charset?</p>
  
  <p>Thank you</p>
  
  <p>I hoped there is an easy way, but after I got recommendations to change the website, I did it in dirty, but working way.
  MY SOLUTION:</p>
  
  <pre><code>function decode(str) {
      str=str.split("%e0").join("א");
      str=str.split("%e1").join("ב");
      str=str.split("%e2").join("ג");
      str=str.split("%e3").join("ד");
      str=str.split("%e4").join("ה");
      str=str.split("%e5").join("ו");
      str=str.split("%e6").join("ז");
      str=str.split("%e7").join("ח");
      str=str.split("%e8").join("ט");
      str=str.split("%e9").join("י");
      str=str.split("%ea").join("ך");
      str=str.split("%eb").join("כ");
      str=str.split("%ec").join("ל");
      str=str.split("%ed").join("ם");
      str=str.split("%ee").join("מ");
      str=str.split("%ef").join("ן");
      str=str.split("%f0").join("נ");
      str=str.split("%f1").join("ס");
      str=str.split("%f2").join("ע");
      str=str.split("%f3").join("ף");
      str=str.split("%f4").join("פ");
      str=str.split("%f5").join("ץ");
      str=str.split("%f6").join("צ");
      str=str.split("%f7").join("ק");
      str=str.split("%f8").join("ר");
      str=str.split("%f9").join("ש");
      str=str.split("%fa").join("ת");
      str=str.split("%20").join(" ");
      return str;
  }
  </code></pre>