Code

Opened 8 months ago

Closed 8 months ago

Last modified 8 months ago

#21359 closed Uncategorized (fixed)

Wrong collation names in the section about MySQL collations

Reported by: k_sze Owned by: nobody
Component: Documentation Version: master
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.

Attachments (0)

Change History (7)

comment:1 Changed 8 months ago by k_sze

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

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

comment:2 Changed 8 months ago by bmispelon

  • Cc bmispelon@… added
  • Triage Stage changed from Unreviewed to Accepted
  • Version changed from 1.4 to 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 Changed 8 months ago by claudep

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 Changed 8 months ago by k_sze

Right, I meant to write utf8_general_ci for utf8.

comment:5 Changed 8 months ago by Claude Paroz <claude@…>

  • Resolution set to fixed
  • Status changed from new to closed

In 67c6c1a7cb2ef971497ba8827be5d6e781c0d2e8:

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

Thanks k_sze for the report.

comment:6 Changed 8 months ago by Claude Paroz <claude@…>

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 Changed 8 months ago by Claude Paroz <claude@…>

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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.