Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#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 Kal Sze, 10 years ago

Actually utf8mb4 is already mentioned here: https://code.djangoproject.com/ticket/18392

comment:2 by Baptiste Mispelon, 10 years ago

Cc: bmispelon@… added
Triage Stage: UnreviewedAccepted
Version: 1.4master

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 Claude Paroz, 10 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:4 by Kal Sze, 10 years ago

Right, I meant to write utf8_general_ci for utf8.

comment:5 by Claude Paroz <claude@…>, 10 years ago

Resolution: fixed
Status: newclosed

In 67c6c1a7cb2ef971497ba8827be5d6e781c0d2e8:

Fixed #21359 -- Corrected MySQL collation name in databases docs

Thanks k_sze for the report.

comment:6 by Claude Paroz <claude@…>, 10 years ago

In f03c699159af53725b08aa5d8f7efb74b4662816:

[1.6.x] Fixed #21359 -- Corrected MySQL collation name in databases docs

Thanks k_sze for the report.
Backport of 67c6c1a7c from master.

comment:7 by Claude Paroz <claude@…>, 10 years ago

In dd0c204828f58f63caa573b0a03df7665c97e6d3:

[1.5.x] Fixed #21359 -- Corrected MySQL collation name in databases docs

Thanks k_sze for the report.
Backport of 67c6c1a7c from master.

Note: See TracTickets for help on using tickets.
Back to Top