title: PHP: Special Characters Conversion
body: <p>I have this problem where I converted a special character to be put on the URL as a parameter using Javascript Ajax request and then reads it to PHP. The character is "Ñ".</p>
  
  <p>In my javascript I put the parameter as escape('PiÑa') and is converted to "Pi%D1a"</p>
  
  <p>And when I read it in my php a diamond shape with a question mark is what will appear. Here is how I read it.</p>
  
  <pre><code>   escape(message) // Message being the "Pi%D1a"
  </code></pre>
  
  <p>Like I said a weird character comes out that when I save it my database, postgreSQL, It gives out an error. How do I fix this?</p>