title: Encoding with JQuery AJAX and PHP
body: <p>I have a html page encoded in:</p>
  
  <pre><code>&lt;meta http-equiv="Content-Type"
  content="text/html; charset=ISO-8859-2"&gt;
  </code></pre>
  
  <p>Every content of the page use this charset, and everything looks good. I need to send an Ajax call to PHP server, but when i send a char <code>á</code> and send the same value back it shows <code>ĂĄ</code> so somehow it changes -i think- to UTF-8... The top of that i need to save this value to an ORACLE DB and in the database it is also saved as an <code>ĂĄ</code>...</p>
  
  <p>PHP CODE (ajax.php):</p>
  
  <pre><code>&lt;?php 
  $p1=$_POST["p1"];
  echo "p1:$p1\n";
  ?&gt; 
  </code></pre>
  
  <p>This AJAX setup still not work:</p>
  
  <pre><code> $.ajax({
      type:'POST',
      url:'ajax.php',
      contentType: "application/x-www-form-urlencoded;charset=ISO-8859-2",
      data:{p1:p1,
            p2:p2, 
            }})   
     .always(function() { alert('complete'); });  
  }
  </code></pre>
  
  <p>Because as the picture shows (below) the ajax call still sent in UTF-8 character encoding
  I appreciate any answer and please do not ask me to change my character encoding to UTF-8, because this is a requirement: (</p>
  
  <p>My other question is why doing nothing this <code>contentType: "application/x-www-form-urlencoded;charset=ISO-8859-2",</code>... It is just killing me.</p>
  
  <p><img src="https://i.stack.imgur.com/hqCB4.png" alt="enter image description here"></p>