UTF8 general oder unicode?

Welche UTF8-Einstellung ist die richtige?
Welche UTF8-Einstellung ist die richtige?

Was ich mich schon immer gefragt habe. Worin besteht der Unterschied in phpmyadmin zwischen einer Datenbank in der Kollation utf8_unicode_ci und einer in utf8_general_ci. Offenbar ist unicode korrekter. Dafür aber langsamer.

For any Unicode character set, operations performed using the _general_ci collation are faster than those for the _unicode_ci collation. For example, comparisons for the utf8_general_ci  collation are faster, but slightly less correct, than comparisons for utf8_unicode_ci. The reason for this is that utf8_unicode_ci supports mappings such as expansions; that is, when one character compares as equal to combinations of other characters. For example, in German and some other languages “ß” is equal to “ss”. utf8_unicode_ci also supports contractions and ignorable characters. utf8_general_ci  is a legacy collation that does not support expansions, contractions, or ignorable characters. It can make only one-to-one comparisons between characters.
(http://dev.mysql.com/doc/refman/5.0/en/charset-unicode-sets.html)

Ich rate zu UTF8-unicode, denn Fehler in Datenbanken, vor allem wenn’s um Codierung geht, sind kaum lösbar.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind markiert *