« Return to Thread: How to specify Charset with PDO/MySQL

Re: How to specify Charset with PDO/MySQL

by Martin Martinov-2 :: Rate this Message:

Reply to Author | View in Thread

Hello,
you can use one of those queries:

set names utf8;
set character set utf8;

I was going to describe what they are doing, but it's already here:
http://dev.mysql.com/doc/refman/5.1/en/charset-connection.html

On 20/11/06, Christian Wittwer <chris@...> wrote:

> Dear List,
> First of all, thanks for your great work on the database components!
>
> I'm using the PDO_mysql adapter to access a mysql-database (5.0.22). All
> tables in the db are UTF-8 encoded.
> When I access with phpmyadmin, selecting charset utf-8 at the login, all
> works great.
> But with my own app using ZF and PDO_mysql, umlauts are not displayed
> correct.
>
> So, how can I specify, that PDO_mysql will use charset utf-8?
>
> Regards,
> Chris
>

--
Warm regards,
Martin Martinov
http://mmartinov.com/

 « Return to Thread: How to specify Charset with PDO/MySQL