#21359 closed Uncategorized (fixed)
Wrong collation names in the section about MySQL collations
| Reported by: | Kal Sze | Owned by: | nobody |
|---|---|---|---|
| Component: | Documentation | Version: | dev |
| Severity: | Normal | Keywords: | mysql, collations, documentation |
| Cc: | bmispelon@… | Triage Stage: | Accepted |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | yes | UI/UX: | no |
Description
This page mentions inexistent collation names: https://docs.djangoproject.com/en/1.4/ref/databases/#collation-settings
utf8_general_ci_swedish and utf8_collation_ci_swedish are not real collations names.
I believe the author was confusing the default collations for latin1 and utf8 charsets.
The default collation for the latin1 charset is latin1_swedish_ci.
The default collation for the utf8 charset is utf8_unicode_ci.
The mistakes persist in the latest dev documentation (https://docs.djangoproject.com/en/dev/ref/databases/#collation-settings)
While we're at it, may I suggest to abandon utf8 in favour of utf8mb4? The details deserve a separate ticket for discussion, so I'll create a new ticket and link here.
Change History (7)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
| Cc: | added |
|---|---|
| Triage Stage: | Unreviewed → Accepted |
| Version: | 1.4 → master |
Hi,
The best reference I could find on the subject was this page: http://dev.mysql.com/doc/refman/5.7/en/charset-unicode-sets.html
It's supposed to list all the available utf8_* collations and it appears that utf8_general_ci_swedish and utf8_collation_ci_swedish are indeed not on it.
However, it also says that the default collation for the utf8 charset is utf8_general_ci, not utf8_unicode_ci.
(Note that I don't have access to a mysql database to test this out and I'm only relying on the docunmentation I could find)
Thanks.
comment:3 by , 12 years ago
I can confirm that on my system (MySQL 5.5), default collation for utf8 is utf8_general_ci:
mysql> SHOW COLLATION LIKE 'utf8\_%'; +--------------------------+---------+-----+---------+----------+---------+ | Collation | Charset | Id | Default | Compiled | Sortlen | +--------------------------+---------+-----+---------+----------+---------+ | utf8_general_ci | utf8 | 33 | Yes | Yes | 1 | ...
comment:5 by , 12 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Actually
utf8mb4is already mentioned here: https://code.djangoproject.com/ticket/18392