Re: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '='
Hello. Please, send the output of the following statements: show variables like '%char%'; show create table table1; Tulong! [EMAIL PROTECTED] wrote: Here's how the problem starts. 1. Entered Korean characters in a form. 2. Press submit and I receive that error. Programming Language: PHP 5.0.4 Database: MySQL 4.1.13 Operating System: Windows XP SP2 Charset for the page: UTF-8 Charset for the table: UTF-8 Charset for the database: UTF-8 So where does latin1_swedish_ci come from? I tried entering the same string in phpMyAdmin and I didn't receive the error. SNIPPET: $query = SELECT `id` FROM `table1` WHERE `column1`='$var'; $result = mysql_query ($query, $link); -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.NET http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Gleb Paharenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '='
SHOW VARIABLES LIKE ''%char%; character_set_client utf8 character_set_connection utf8 character_set_database utf8 character_set_results utf8 character_set_server latin1 character_set_system utf8 SHOW CREATE TABLE `table1`; CREATE TABLE `main_peeps` ( `id` int(11) unsigned NOT NULL auto_increment COMMENT 'Primary Key', `test` varchar(255) NOT NULL default '' COMMENT 'Test', PRIMARY KEY (`id`), ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='COMMENT HERE' Please, send the output of the following statements: show variables like '%char%'; show create table table1; -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '='
Mark Dacasco wrote: SHOW VARIABLES LIKE ''%char%; character_set_client utf8 character_set_connection utf8 character_set_database utf8 character_set_results utf8 character_set_server latin1 character_set_system utf8 SHOW CREATE TABLE `table1`; CREATE TABLE `main_peeps` ( `id` int(11) unsigned NOT NULL auto_increment COMMENT 'Primary Key', `test` varchar(255) NOT NULL default '' COMMENT 'Test', PRIMARY KEY (`id`), ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='COMMENT HERE' Please, send the output of the following statements: show variables like '%char%'; show create table table1; adding to the section [mysqld] of the file my.cnf character-set-server = utf8 solves the problem ? -- . These pages are best viewed by coming to my house and looking at . . my monitor. [S. Lucas Bergman (on his website)]. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '='
I didn't find any option for character-set-server so I add it under mysqld as you've stated. I also found default-character-set so I also set its value to utf8. It didn't work. I tried adding a dash (utf-8) to it. It didn't work also. Yes, I did restart MySQL after saving the configuration. What does that error mean, by the way? adding to the section [mysqld] of the file my.cnf character-set-server = utf8 solves the problem ? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '='
useful links: http://dev.mysql.com/doc/mysql/en/charset-collation-charset.html http://dev.mysql.com/doc/mysql/en/Charset-server.html http://dev.mysql.com/doc/mysql/en/Charset-map.html http://dev.mysql.com/doc/mysql/en/Option_files.html http://bugs.mysql.com/bug.php?id=3611 I've found this in my php.ini, should _not_ be related but it can worth a try (apache restart required). === php.ini === [PHP] default_charset = utf-8 [mbstring] mbstring.internal_encoding = utf-8 === php.ini === and finally SHOW VARIABLES LIKE '%char%'; look like this now character_set_client utf8 character_set_connection utf8 character_set_database utf8 character_set_results utf8 character_set_server utf8 character_set_system utf8 right ? Mark wrote: I didn't find any option for character-set-server so I add it under mysqld as you've stated. I also found default-character-set so I also set its value to utf8. It didn't work. I tried adding a dash (utf-8) to it. It didn't work also. Yes, I did restart MySQL after saving the configuration. What does that error mean, by the way? The first link provided answer to this question. adding to the section [mysqld] of the file my.cnf character-set-server = utf8 solves the problem ? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '=' (SOLVED)
You're right. It is not related. The same output are shown as before. However, the links you gave me was quite useful. I re-read and re-read them over and over until this little query solved my dilemma, sort of: SET NAMES 'utf8'; Thanks for the help! ^_^ useful links: http://dev.mysql.com/doc/mysql/en/charset-collation-charset.html http://dev.mysql.com/doc/mysql/en/Charset-server.html http://dev.mysql.com/doc/mysql/en/Charset-map.html http://dev.mysql.com/doc/mysql/en/Option_files.html http://bugs.mysql.com/bug.php?id=3611 I've found this in my php.ini, should _not_ be related but it can worth a try (apache restart required). === php.ini === [PHP] default_charset = utf-8 [mbstring] mbstring.internal_encoding = utf-8 === php.ini === and finally SHOW VARIABLES LIKE '%char%'; look like this now character_set_client utf8 character_set_connection utf8 character_set_database utf8 character_set_results utf8 character_set_server utf8 character_set_system utf8 right ? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]