Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have the following issue with accent insensitive search in Czech language. My database is set to Czech_CI_AI collation. For some diacritics system works correctly (ie. I), but for some does not (ie. R). In my database there are several 'DVORA*' records:

SELECT contact_name 
FROM   CONTCTSM1 
WHERE  CONTACT_NAME LIKE 'DVO%' 

Results:

DVOŘÁČKOVÁ,
IVETA DVOŘÁČKOVÁ,
JIŘINA DVOŘÁK

share|improve this question
    
I see the same behaviour with the newer 100 collation too. SELECT 1 WHERE N'R' = N'Ř' COLLATE Czech_100_CI_AI returns nothing. –  Martin Smith Feb 8 '12 at 9:19
    

2 Answers 2

R and Ř are different letters, as opposed to modified base letters(?) like German umlauts with ö vs o

From Czech language on Wikipedia (my bold)

The acute accent (čárka) letters (Á, É, Í, Ó, Ú, Ý) and the kroužek letter Ů all indicate long vowels. They have the same alphabetical ordering as their non-diacritic counterparts. ...The háček (ˇ) indicates historical palatalization of the base letter. The letters Č, Ř, Š, and Ž currently represent postalveolar consonants and are ordered behind their corresponding base letters; while Ď, Ň, Ť represent palatal consonants and have the same alphabetical ordering as their non-diacritic counterparts.

A test with Ö and O in Swedish (different letters) and German (modified)

SELECT 'Finnish_Swedish_100_CI_AI' 
          WHERE N'Ö' COLLATE Finnish_Swedish_100_CI_AI = N'O'
UNION ALL
SELECT 'Latin1_General_CI_AI' 
          WHERE N'Ö' COLLATE Latin1_General_CI_AI = N'O'
share|improve this answer

Well, that's all nice and dandy, but while R and Ř should be treated differently while sorting, they should be considered the same when comparing "accent insensitively". Dvořák should be sorted after Dvorak and even "dobře" after "dobrý", it makes no sense whatsoever no to find "Dvořák" when searching for "Dvorak" ignoring accents. As it is, the accent insensitive Czech collations are worse than useless.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.