"Corn Walker" wrote:

> While you can technically store UTF-8, UTF-16, and UTF-32 in a VARCHAR field
> (you need a VARCHAR because otherwise MySQL will allocate storage on a 1 char
> = 1 byte basis), if you rely on the database to order the records you may have
> inconsistent results. If, on the other hand, you do all of the heavy lifting
> in PHP then you're okay. Except I seem to recall that PHP doesn't support UTF
> in any version.

Without specific reference to PHP 5, which I do not deploy currently, you
can use UTF-8 with PHP _if_ you (or your provider) compiled PHP with the
'mbstring' extension.

Even if you (or your provider) did not, or can not, compile with this
extension, you can use the PHP-UTF-8 Library.  This is an open source
library for PHP which emulates the main PHP string functions for UTF-8.

    <http://sourceforge.net/projects/phputf8>


You can find some useful help with this library here:

    <http://www.sitepoint.com/blogs/2006/02/26/php-utf-8-01/>


-- 
Gary

Reply via email to