Page 1 of 1

Data truncated for polish letters - utf8_polish_ci

Posted: Mon May 04, 2009 10:21 am
by Wolfie
Hello,


I have been serching the problem in my databese cause I get this error :
Data truncated for column 'align' at row 1
And after some reserches I have discover that it is because of my national polish letters, but there is something weird in there cause charset is utf8 and collation is utf8_polish_ci

Enybody knows what shpuld I do ? After some hours of researches I really don't have idea....

Re: Data truncated for polish letters - utf8_polish_ci

Posted: Sat May 09, 2009 6:55 pm
by david64
When you connect to that database in PHP you have the option to tell the database what character set you are using.

If you are using PDO, you can do this by using the DNS like this: mysql:host=localhost;dbname=db;charset=utf-8;

You can also do it by MYSQL query like this:

Code: Select all

SET CHARSET utf8;SET NAMES utf8;