title: php, urldecode() and the umlaut - ö
body: <p>Using PHP 5.3.2, I'm having trouble with handling a request for a page whose name has an umlaut in it: ö</p>
  
  <p>Making the request using Firefox + Live HTTP Headers for the test_ö_test.htm page, I can see firefox automatically converts/encodes the umlaut when it makes a request:</p>
  
  <pre><code>GET /test_%C3%B6_test.htm HTTP/1.1
  </code></pre>
  
  <p>Now, using <a href="http://meyerweb.com/eric/tools/dencoder/" rel="nofollow">http://meyerweb.com/eric/tools/dencoder/</a> I am able to encode/decode between test_ö_test.htm and test_%C3%B6_test.htm, so I figure that encoding is correct.</p>
  
  <p>Using PHP's urldecode(), I get test_Ã¶_test.htm</p>
  
  <p>And the hated 404 is returned. Note that test_ö_test.htm does exist on the file system.</p>
  
  <p>When I test with javascript's escape() I get test_%F6_test.htm. When I plug that into my browser, I get the content page returned successfully. urldecode() turns that back into the umlaut.</p>