Wednesday 14 July 2010

internalization of mysql

On a recent project I had a problem to import into MySQL a file tab delimited formatted with utf-8. I found that I have to set the collation of the column to utf-8, but there are several. according to what i found in other blogs, i tried utf8_unicode_ci, but after few trials and that i got gibberish for the special characters I changed it to utf8_bin and it works fine.

A later addition:
I repeat what I thought works a bit later and realised I can't repeat my success. It seems only writing php script solves the problem. Another thing if you copy utf8 data and use phpmyadmin it's important to verify the page's encoding is indeed utf8.