I am using Doctrine with Symfony2. My config.yml file looks something like this:-
doctrine:
dbal:
driver: %data
I've got this problems with fetching data which includes polish characters from database. It looks like:
effects of displaying data from db
my config.yml is like:
doctrine:
dbal:
driver: pdo_mysql
host: "%database_host%"
port: "%database_port%"
dbname: "%database_name%"
user: "%database_user%"
password: "%database_password%"
charset: UTF8
options:
1002: "SET NAMES 'UTF8'"
and I've been searching for an answer for couple of hours - Im so tired of this. "1002: SET NAMES 'utf8'" Doesnt work for me. But when I tryed to access my db from simple php script (out of symfony) the effect was the same but when I added line:
mysql_query("SET NAMES 'utf8'");
it worked properly. So it seems to be little strange. All the tables in my db have 'utf8_unicode_ci' set.