Re: Unicode problems

From: Date: Fri, 26 Sep 2008 15:55:31 +0000
Subject: Re: Unicode problems
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-280987@lists.php.net to get a copy of this message
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

« previous php.general (#280987) next »