title: Php problems with characters
body: <p>I am building an app with Apache cordova for the support team for my company and everything was ok when I was using a test database in UTF8 was working.</p>
  
  <p>Then when I was implement the real db I notice it was encoded with win-1252.</p>
  
  <p>The problem is, even the db is with win-1252 we have many rows using special caracters like "ç" and "~" and "´" and "`" and with that when I am running the php all rows in the tables in my db will not show becasue of that.</p>
  
  <p>Keep in mind I cann't convert the db to utf8.</p>
  
  <p>ps:The solution I see is go to each row and remove that caracters but isn't a good solution(about 20,000 rows)</p>
  
  <p>........................</p>
  
  <p>PHP file:</p>
  
  <pre><code>header("Access-Control-Allow-Origin: *");
  
  $dbconn = pg_connect("host=localhost dbname=bdgestclientes2 
      user=postgres password=postgres") 
      or die('Could not connect: ' . pg_last_error());
  
  $data=array();
  
  $q=pg_query($dbconn,"SELECT * FROM clientes WHERE idcliente = 3");
  </code></pre>
  
  <p>$row=pg_fetch_object($q)){$data[]=$row};</p>
  
  <p>echo json_encode($data);</p>