Print

Print


Andrew,

When I've had this problem before I needed to add the following the  
mysql connection string url:

&useUnicode=true&characterEncoding=UTF8

Duane

On Apr 10, 2007, at 12:55 PM, Andrew Darby wrote:

> Hello, all.  I'm going a little crazy with getting some unicode data
> from MySQL to display properly in a web page, and wondered if you had
> any ideas.
>
> The records are in MySQL (4.1.21) with a utf8_unicode_ci collation.
> When I view in phpmyadmin, everything looks fine.  If I run my query
> in phpmyadmin, everything still looks fine, I can cut and paste the
> record into the web page, and it displays fine, but when I grab the
> data from MySQL it conks out:
>
> http://www.ithacalibrary.com/research/unicode_test.php
>
> I assume the problem is with my query or the connection, but I'm not
> sure how I should do it.  I've tried explicitly setting the character
> set like so:
>
> SET names = 'utf8_unicodel_ci';
> SET CHARACTER SET 'utf8_unicode_ci'
>
> But this is voodoo to me--just saw it somewhere on the internets.
>
> Am I missing something obvious?  Any ideas?
>
> Thanks,
>
> Andrew