`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.
--
Ticket URL: <https://code.djangoproject.com/ticket/21359>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
Actually `utf8mb4` is already mentioned here:
https://code.djangoproject.com/ticket/18392
--
Ticket URL: <https://code.djangoproject.com/ticket/21359#comment:1>
* cc: bmispelon@… (added)
* version: 1.4 => master
* stage: Unreviewed => Accepted
Comment:
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.
--
Ticket URL: <https://code.djangoproject.com/ticket/21359#comment:2>
Comment (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
|
...
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/21359#comment:3>
Comment (by k_sze):
Right, I meant to write `utf8_general_ci` for `utf8`.
--
Ticket URL: <https://code.djangoproject.com/ticket/21359#comment:4>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"67c6c1a7cb2ef971497ba8827be5d6e781c0d2e8"]:
{{{
#!CommitTicketReference repository=""
revision="67c6c1a7cb2ef971497ba8827be5d6e781c0d2e8"
Fixed #21359 -- Corrected MySQL collation name in databases docs
Thanks k_sze for the report.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/21359#comment:5>
Comment (by Claude Paroz <claude@…>):
In [changeset:"f03c699159af53725b08aa5d8f7efb74b4662816"]:
{{{
#!CommitTicketReference repository=""
revision="f03c699159af53725b08aa5d8f7efb74b4662816"
[1.6.x] Fixed #21359 -- Corrected MySQL collation name in databases docs
Thanks k_sze for the report.
Backport of 67c6c1a7c from master.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/21359#comment:6>
Comment (by Claude Paroz <claude@…>):
In [changeset:"dd0c204828f58f63caa573b0a03df7665c97e6d3"]:
{{{
#!CommitTicketReference repository=""
revision="dd0c204828f58f63caa573b0a03df7665c97e6d3"
[1.5.x] Fixed #21359 -- Corrected MySQL collation name in databases docs
Thanks k_sze for the report.
Backport of 67c6c1a7c from master.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/21359#comment:7>