vieten / sequel-pro

Automatically exported from code.google.com/p/sequel-pro
Other
0 stars 0 forks source link

Issue in Filter with "ü" #1174

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Filter a column that contains "ü" will return entries with "y"
For example: SELECT * FROM `table` WHERE `column` LIKE '%ü%';

What is the expected output? What do you see instead?
A filtered List with "ü" not with "y"

What version of Sequel Pro are you using? What version of MySQL are you
connecting to on the server?
Sequel 0.9.9.1

Original issue reported on code.google.com by Jahn1...@googlemail.com on 6 Sep 2011 at 10:31

GoogleCodeExporter commented 9 years ago
This seems to be a mysql bug.

The same behaviour with mysql client and PHP:

UTF8 connection + UTF8 query + UTF8 column = correct result
UTF8 connection + Latin1 query + UTF8 column = no result (expected)
Latin1 connection + Latin1 query + UTF8 column = correct result
Latin1 connection + UTF8 query + UTF8 column = correct result

UTF8 connection + UTF8 query + Latin1 column = wrong result
UTF8 connection + Latin1 query + Latin1 column = no result (expected)
Latin1 connection + Latin1 query + Latin1 column = wrong result
Latin1 connection + UTF8 query + Latin1 column = correct result

Original comment by schlabbe...@gmail.com on 6 Sep 2011 at 2:54

GoogleCodeExporter commented 9 years ago
Reported to MySQL http://bugs.mysql.com/bug.php?id=64806

Original comment by schlabbe...@gmail.com on 29 Mar 2012 at 6:48

GoogleCodeExporter commented 9 years ago
OK, having discussed this MySQL and Sequel Pro are behaving correctly (or at 
least in order with MySQLs spec).

The reasoning seems to be that for searching and sorting in non-UTF8 charsets 
mysql maps certain characters onto their latin equivalent.
Now the default charset is latin1_swedish - and swedish usually does not 
contain Ü but the pronunciation of Ü is equivalent to y (try that with the 
german pronunciation of "Xylophon") - also ß would be the very last letter in 
the alphabet.

From Wikipedia:
> The umlauted ⟨ü⟩ is recognised, but is only used in names of German 
origin. It is otherwise treated as a variant of ⟨y⟩ and is called a "German 
Y". 

If you however change your collation to latin1_german the Ü will equal u ( Ü 
!= u can only be achieved using UTF-8) - and ß will equal s.

http://www.collation-charts.org/mysql60/mysql604.latin1_swedish_ci.html
http://www.collation-charts.org/mysql60/mysql604.latin1_german1_ci.html

Original comment by schlabbe...@gmail.com on 16 Apr 2012 at 10:13