0

MySQL Example:

SELECT 'ä' = 'ae' COLLATE latin1_german2_ci;

Returns 0 and not 1 like in the example:

My variables look like this (after some configuration): - 'character_set_client', 'latin1'

  • 'character_set_connection', 'latin1'
  • 'character_set_database', 'latin1'

  • 'character_set_filesystem', 'latin1'

  • 'character_set_results', 'latin1'
  • 'character_set_server', 'latin1'
  • 'character_set_system', 'utf8'
  • 'character_sets_dir', 'C:\Program Files\MySQL\MySQL Server 5.6\share\charsets\'

I think there is an error. I remember that

  • character_set_filesystem was 'binary'

  • and the others were 'utf8'.

But this configuration, i get an error that latin1_german2_ci is not suitable with uft8. So i tried to configured that a simple query like this works:

Select * 
from dubletten
where name="Flöss" collate latin1_german2_ci;

Before it doesnt, now returns only matches with "Flöss" and not "Floess".

Some idea?

Thanks!

Gordon Linoff
  • 1,242,037
  • 58
  • 646
  • 786
ubuseral
  • 427
  • 1
  • 3
  • 14
  • 1
    When you are using UTF-8, you should use collations `utf8_general_ci` or `utf8_unicode_ci` – both of those treat German umlauts as equal to their non-umlauted counterparts (with the difference between the two being how `ß` is compared.) https://dev.mysql.com/doc/refman/5.5/en/charset-unicode-sets.html – CBroe Oct 04 '15 at 14:16
  • How do you use a query to do this? I already tried to use utf8_unicode_ci, its case insensitive, an works well for ß and ss. But it doesnt work for umlauts. That means if i searched for "Flöss", i dont get Floess, or when i searched FlÖss, i dont get Floess. – ubuseral Oct 04 '15 at 17:17

0 Answers0