Witam
Zmagam sie juz sporo chwile z poprawna konfiguracja mysql zwiazana z kodowania utf8.
O ile ustawienie tego kodowania nie jest problemem o tyle praca na nim nie jest juz taka przyjemna;/
Moja obecna konfiguracja:
mysql> status
mysql Ver 14.12 Distrib 5.0.51a, for Win32 (ia32)
Current user: root@localhost
Server version: 5.0.51a-community-nt MySQL Community Edition (GPL)
Server characterset: utf8
Db characterset: utf8
Client characterset: utf8
Conn. characterset: utf8
mysql> show variables LIKE 'char%';
+--------------------------+---------------------------------------------------------+
| Variable_name | Value |
+--------------------------+---------------------------------------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | C:\Program Files\MySQL\MySQL Server 5.0\share\charsets\ |
+--------------------------+---------------------------------------------------------+
dodalam rowniez w my.ini
default-character-set=utf8
Po utworzeniu testowej tabeli
mysql> show create table test;
+-------+-----------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+-----------------------------------------------------------------------------------------------+
| test | CREATE TABLE `test` (
`name` varchar(222) default NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 |
+-------+-----------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
probuje dodac do niej nowy rekord:
mysql> insert into test value('ść');
ERROR 1366 (HY000): Incorrect string value: '\x98\x86' for column 'name' at row 1
Jak rozwiazac ten problem bo ja juz nie mam pomyslu;/
Pozdrawiam;*