List:General Discussion« Previous MessageNext Message »
From:Daevid Vincent Date:September 26 2013 9:44pm
Subject:Why is mySQL not respecting foreign characters as different
View as plain text  
How come MySQL is not differentiating between these characters?

SELECT text_id, us, de, es, fr  
  FROM texts
  WHERE us = fr;

Results in matching here. Notice the difference in the "scene" vs "scène"

text_id         us      es      de         fr      
--------------  ------  ------  ---------  --------
all_page_scene  scene   escena  Filmszene  scène  


I wold expect this NOT to match.

Do I have to add something to my query to tell MySQL to respect other
character sets as different?

CREATE TABLE `texts` (
  `text_id` varchar(50) CHARACTER SET latin1 COLLATE latin1_general_ci NOT
NULL DEFAULT '',
  `us` text,
  `es` text,
  `de` text,
  `fr` text,
  PRIMARY KEY (`text_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8

Field    Type         Collation          Null    Key     Default  Extra
Privileges                       Comment  
-------  -----------  -----------------  ------  ------  -------  ------
-------------------------------  ---------
text_id  varchar(50)  latin1_general_ci  NO      PRI
select,insert,update,references           
us       text         utf8_general_ci    YES             (NULL)
select,insert,update,references           
es       text         utf8_general_ci    YES             (NULL)
select,insert,update,references           
de       text         utf8_general_ci    YES             (NULL)
select,insert,update,references           
fr       text         utf8_general_ci    YES             (NULL)
select,insert,update,references           

Thread
Why is mySQL not respecting foreign characters as differentDaevid Vincent26 Sep
  • Re: Why is mySQL not respecting foreign characters as differentClaudio Nanni26 Sep
  • Re: Why is mySQL not respecting foreign characters as differentAnders Karlsson26 Sep
    • Re: Why is mySQL not respecting foreign characters as differentHartmut Holzgraefe27 Sep