Transition MySQL 4.1.14 cp1251->MySQL 5.0.27 utf-8 - how?
Posted: Wed Feb 28, 2007 8:38 am
Hi,
I have problems when moving my blog to newer php/mysql/apache.
I ran my blog on PHP 5.0.2 / MySQL 4.1.14 in cp1251 page before. This is a Bulgarian codepage with cyrillic letters. I reinstalled my system and have PHP 5.2.1 / MySQL 5.0.27 now.
When was on MySQL 4.1.14 I exported the database in sql file, which is written in utf-8 (I checked in my editor). All cyrillic texts was able to be seen. I imported the database in mysql 5.0.27, and saw '???????' where should be cyrillic texts from database. The menus, and other stuff that comes from serendipity is in cyrillic and can be read.
I did a second try: In the SQL file, I changed all CREATE TABLE .... DEFAULT CHARSET=cp1251; by CREATE TABLE .... CHARSET=utf8 COLLATE=utf8_unicode_ci;. Then imported this file (previously dropped the database from the first try). And again I saw '??????????????' instead of cyrillic letters. I switched to utf8 in serendipity config, but the same result.
Then I tried ... CHARSET=utf8; but missed COLLATE=utf8_unicode_ci. The same result.
Where should I dig to resolve this ? May be somwhere in php-mysql link ? I'm sorry but the server is not public and I cannot provide url to it. Any help would be welcome.
I have problems when moving my blog to newer php/mysql/apache.
I ran my blog on PHP 5.0.2 / MySQL 4.1.14 in cp1251 page before. This is a Bulgarian codepage with cyrillic letters. I reinstalled my system and have PHP 5.2.1 / MySQL 5.0.27 now.
When was on MySQL 4.1.14 I exported the database in sql file, which is written in utf-8 (I checked in my editor). All cyrillic texts was able to be seen. I imported the database in mysql 5.0.27, and saw '???????' where should be cyrillic texts from database. The menus, and other stuff that comes from serendipity is in cyrillic and can be read.
I did a second try: In the SQL file, I changed all CREATE TABLE .... DEFAULT CHARSET=cp1251; by CREATE TABLE .... CHARSET=utf8 COLLATE=utf8_unicode_ci;. Then imported this file (previously dropped the database from the first try). And again I saw '??????????????' instead of cyrillic letters. I switched to utf8 in serendipity config, but the same result.
Then I tried ... CHARSET=utf8; but missed COLLATE=utf8_unicode_ci. The same result.
Where should I dig to resolve this ? May be somwhere in php-mysql link ? I'm sorry but the server is not public and I cannot provide url to it. Any help would be welcome.