Finally after some hours of debugging I found out. As easy as could
be. Just add the pdo options parameter PDO::MYSQL_ATTR_INIT_COMMAND
(=1002) with value SET NAMES utf8 in app/config/config.yml.
## Doctrine Configuration
doctrine.dbal:
driver: PDOMySql
dbname: mydb
user: xxxxxxx
password: xxxxxxx
options:
1002: "SET NAMES utf8"
But I don't think it's meant to be like that.
ragards
Peter
On 27 Jan., 21:35, Gábor Fási <[email protected]> wrote:
> It was just a guess, I'm yet to start experimenting with Sf2.
>
> Check the web debug toolbar if doctrine issues a "SET NAMES utf8" query.
>
>
>
>
>
>
>
> On Thu, Jan 27, 2011 at 21:18, pzwosta <[email protected]> wrote:
> > I tried phpMyAdmin, theumlautslook correct. phpMyAdmin also shows
> > the utf-8 options for collation of the tables and the database and
> > shows the following options for MySQL
>
> > MySQL localhost
>
> > Zeichensatz / Kollation der MySQL-Verbindung: utf8_general_ci (charset
> > of MySQL connection)
>
> > MySQL
> > * Server: localhost via TCP/IP
> > * Server Version: 5.1.49-community
> > * Protokoll-Version: 10
> > * Benutzer: root@localhost
> > * MySQL-Zeichensatz: UTF-8 Unicode (utf8)
>
> > Any idea? Do you know where to set the charset/collation using Symfony
> > 2?
>
> > regards
> > Peter
>
> > On 23 Jan., 16:12, Gábor Fási <[email protected]> wrote:
> >> How do you insert the data? Do they look correct in phpmyadmin, after
> >> making sure it uses utf8-encoded connection?
>
> >> On Sun, Jan 23, 2011 at 15:59, pzwosta <[email protected]> wrote:
> >> > Hi,
>
> >> > using Doctrine GermanUmlautsare not retrieved correctly from
> >> > database.
>
> >> > - My database is defined with collation utf8 - utf8_unicode_ci
> >> > (inherited by the tables, MySQL Workbench, Windows).
> >> > - The schema definitions for Doctrine are created automatically by
> >> > doctrine:schema:import.
>
> >> > When debugging in Eclipse I can see that the values in the Doctrine
> >> > objects are wrong (not only the web page in firefox). My Eclipse
> >> > project editor charset is also UTF-8.
>
> >> > This is my config.yml. Is there any other place where to config
> >> > charset UTF-8? I wasn't able to find anything in the docs.
>
> >> > # config.yml
> >> > app.config:
> >> > charset: UTF-8
> >> > ....
> >> > doctrine.dbal:
> >> > driver: PDOMySql
> >> > dbname: xxxxx
> >> > user: xxxxx
> >> > password: xxxx
>
> >> > Do you have any hint for me?
>
> >> > Thanks.
> >> > Peter
>
> >> > --
> >> > If you want to report a vulnerability issue on symfony, please send it
> >> > to security at symfony-project.com
>
> >> > You received this message because you are subscribed to the Google
> >> > Groups "symfony users" group.
> >> > To post to this group, send email to [email protected]
> >> > To unsubscribe from this group, send email to
> >> > [email protected]
> >> > For more options, visit this group at
> >> >http://groups.google.com/group/symfony-users?hl=en
>
> > --
> > If you want to report a vulnerability issue on symfony, please send it to
> > security at symfony-project.com
>
> > You received this message because you are subscribed to the Google
> > Groups "symfony users" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=en
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en