title: PHP's rawurlencode is not equal to JavaScripts escape! Why?
body: <p>i realized when i used urlencode or rawurlencode in PHP encoding the simple character § (paragraph) i get the following result: "%C2%A7".</p>
  
  <p>But when i use escape in Javascript to encode that character, i get only "%A7".</p>
  
  <p>In this case i have encoding problems when sending/receiving data between the server running PHP and the javascript client trying to fetch the data via ajax/jquery.</p>
  
  <p>I want to be able to write any type of text i want. For this i encode the text and send it to the backend php script, escaping the data and sending. When i retrieve it, on php side i take the data from mysql and do rawurlencode and send it back.</p>
  
  <p>Both sides, work in UTF-8 mode. jquery ajax function is called with <code>"contentType: application/x-www-form-urlencoded:charset=UTF-8"</code>, mysql server is set for UTF-8 both for client and server, and the php script starts echoing with <code>header( "application/x-www-form-urlencoded:charset=UTF-8");</code></p>
  
  <p>Why is PHP producing that %C2 thing, which generates the character Â on javascript side.</p>
  
  <p>Coult somebody help?</p>