Re: Unicode problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 26 Sep 2008 10:39:33 +0100, Nathan Rixham wrote:

>> [...]
>> I couldn't find any good function/script to convert all my files to UTF-8
>> and then I built my own. It uses iconv and works like a charm. But
>> unfortunately I still can't get all pages to work. I have no idea why or
>> how, but *some* queries return the text in ISO-8859-1. I even dropped the
>> table and recreated them explictly saying it's a UTF8 table but some rows
>> are in ISO and others in UTF-8 (that or some mysql_fetch_* functions
>> converts them).

Can you confirm: are you telling your PHP connection into MySQL to use
Unicode? e.g. tell MySQL directly by executing the following statement:

	set names 'utf8'

Also, is some of your data going through htmlentities() and coming out
wrong? If so, look at specifying the character set:

	htmlentities($someText, ENT_COMPAT, 'utf-8');
-- 
Ross McKay, Toronto, NSW Australia
"Let the laddie play wi the knife - he'll learn"
- The Wee Book of Calvin

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux