4.0 -> 4.1: UTF-8 trouble
Posted by: Alexandru Burciu
Date: July 16, 2005 07:46AM

Hello,
I am moving from a 4.0.17 MySQL server to 4.1.11 server with default UTF-8 support.
The problem is that text was stored blindly in the old db and viewable only with the correct browser encoding, let's say becyr-win1251 from phpmyadmin.
Now, in the new db, text became unreadable nomather the encoding.
I made the dump with phpMyAdmin 2.6.0-pl1. And the import with mysql db < file.sql.
What can be the problem? How can I convert the old database? What is the default charset for 4.0?

Another problem is a win32 mysql server, I can't set it to UTF-8 correctly. Thus I opted for UTF-8 in the config wizzard, I get this:

mysql> show variables like "%col%";
+----------------------+-------------------+
| Variable_name | Value |
+----------------------+-------------------+
| collation_connection | latin1_swedish_ci |
| collation_database | utf8_general_ci |
| collation_server | utf8_general_ci |
| protocol_version | 10 |
+----------------------+-------------------+
4 rows in set (0.00 sec)



mysql> show variables like "%char%";
+--------------------------+---------------------------------------------------------+
| Variable_name | Value |
+--------------------------+---------------------------------------------------------+
| character_set_client | latin1 |
| character_set_connection | latin1 |
| character_set_database | utf8 |
| character_set_results | latin1 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | E:\Program Files\MySQL\MySQL Server 4.1\share\charsets/ |
+--------------------------+---------------------------------------------------------+
7 rows in set (0.02 sec)

Also, from PHP, when I echo $mysqli->character_set_name(); I still get latin1.
Thanks!

http://students.info.uaic.ro/~alexandru.burciu/



Edited 2 time(s). Last edit at 03/11/2006 04:48PM by Alexandru Burciu.

Options: ReplyQuote


Subject
Views
Written By
Posted
4.0 -> 4.1: UTF-8 trouble
3015
July 16, 2005 07:46AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.