4 ms·
But a lot of databases have to deal with people's names. To paraphrase an old saying, "I don't care why I'm in the database, as long as they spell my name right
by dmethvin 13y ago
But a lot of databases have to deal with people's names. To paraphrase an old saying, "I don't care why I'm in the database, as long as they spell my name right."
- joshfraser 13y agoutf8_general_ci will still spell your name correctly, it just might not sort it correctly if you use an ORDER BY
- _delirium 13y agoFor highly multilingual databases sort order is basically a lost cause anyway, because there is no globally correct, multilingual Unicode sort order. Even when using the same alphabet different languages have different sorting conventions. And some languages' correct sorting order is not even fully decidable solely from the UTF8 text. For example, Danish treats 'aa' as a sequence of two 'a' letters sometimes (mainly in words and names of non-Danish origin), and as a variant spelling of 'å' other times. So in a properly collated Danish encyclopedia, Aachen goes near the beginning of the encyclopedia, while Aalborg goes near the end. Good luck implementing that in your database!
- rogerbinns 13y agoThe unicode people have addressed this with the Unicode Collation Algorithm - http://www.unicode.org/reports/tr10/ http://www.unicode.org/reports/tr10/ - which obviously can't be perfect, but it can be reasonable. The ICU project - http://site.icu-project.org/ http://site.icu-project.org/ - has open source implementations of the collation algorithm including appropriate information for different locales. ie you shows those Danish names to a Danish user in their expected sort order, while also showing them to an American in their expected sort order. i18n and l10n is hard. But it is also largely solved fairly well, and there is no excuse to avoid it all together or not use the ICU code.