title: encodeURIComponent and encodeURI
body: <p>I am trying to encode the French characters inside the URL.</p>
  
  <p>The url is constructed in javascript, and then I use <code>window.open</code> to open the url.</p>
  
  <p>For example,</p>
  
  <pre><code>var alt_title='Thierry Frémaux: Les confiden'
  </code></pre>
  
  <ol>
  <li><p><code>window.open('http://example.com/alt_title'=+encodeURIComponent(altCatTit));</code></p></li>
  <li><p><code>window.open(encodeURI('http://example.com/alt_title='+encodeURIComponent(altCatTit))</code></p></li>
  </ol>
  
  <p>When <strong>1.</strong> executes, I don't see the French characters being encoded in the new popup's url.</p>
  
  <p>When <strong>2.</strong> executes, I do see them being encoded.</p>
  
  <p>Could you please tell me why do I need to encode them twice in order for them to appear as encoded in the new popup's URL?</p>
  
  <p>Is it the right way of encoding special characters in the URL?</p>
  
  <p>Fixed the typo's sorry!</p>