note 76165 added to function.mysql-client-encoding
| From: | msieniek at interia dot pl | Date: | Tue, 03 Jul 2007 16:31:10 +0000 |
| Subject: | note 76165 added to function.mysql-client-encoding | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-128184@lists.php.net to get a copy of this message | ||
I had the same problem as bartullus, I'm from Poland too. I had my base encoded in UTF-8 and my
website in ISO-8859-2 aka Latin-2. Long time those fuckin' question marks appeared...
I used this function mysql_client_encoding() but it shows "latin1" which appeared to be
false. My solution was to include those two lines after connection to database in my PHP script:
<?
mysql_query("SET CHARACTER SET latin2");
mysql_query("SET NAMES latin2");
?>
So, probably this function lies;)
----
Server IP: 82.160.108.140
Probable Submitter: 195.150.178.2
----
Manual Page -- http://www.php.net/manual/en/function.mysql-client-encoding.php
Edit -- https://master.php.net/note/edit/76165
Del: integrated -- https://master.php.net/note/delete/76165/integrated
Del: useless -- https://master.php.net/note/delete/76165/useless
Del: bad code -- https://master.php.net/note/delete/76165/bad+code
Del: spam -- https://master.php.net/note/delete/76165/spam
Del: non-english -- https://master.php.net/note/delete/76165/non-english
Del: in docs -- https://master.php.net/note/delete/76165/in+docs
Del: other reasons-- https://master.php.net/note/delete/76165
Reject -- https://master.php.net/note/reject/76165
Search -- https://master.php.net/manage/user-notes.php