[Django] #31016: Documentation: MySQL notes: utf8

3 views
Skip to first unread message

Django

unread,
Nov 21, 2019, 6:07:30 AM11/21/19
to django-...@googlegroups.com
#31016: Documentation: MySQL notes: utf8
-------------------------------------+-------------------------------------
Reporter: minusf | Owner: nobody
Type: | Status: new
Uncategorized |
Component: | Version: 2.2
Documentation | Keywords: mysql mariadb utf8
Severity: Normal | utf8mb4
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-------------------------------------+-------------------------------------
https://docs.djangoproject.com/en/2.2/ref/databases/#creating-your-
database

Currently the documentation recommends using the following SQL to create a
'utf8' database:

{{{
CREATE DATABASE <dbname> CHARACTER SET utf8;
}}}


Claiming "This ensures all tables and columns will use UTF-8 by default."

Currently in mysql (and mariadb) `utf8` means only a subset of `UTF-8`. To
get the full range one must use `utf8mb4` (which will be the default
somewhere in mysql 8).

I think the advice should be amended to use `utf8mb4` as it is misleading
at the moment. Or at the very least the followup sentence should mention
that `utf8` creates only a subset of characters, and not all utf8 can be
stored in it.

--
Ticket URL: <https://code.djangoproject.com/ticket/31016>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Nov 21, 2019, 6:40:04 AM11/21/19
to django-...@googlegroups.com
#31016: Documentation: MySQL notes: utf8.

-------------------------------------+-------------------------------------
Reporter: minusf | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Documentation | Version: master
Severity: Normal | Resolution: duplicate
Keywords: mysql mariadb utf8 | Triage Stage:
utf8mb4 | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* status: new => closed
* resolution: => duplicate
* version: 2.2 => master
* easy: 1 => 0
* type: Uncategorized => Cleanup/optimization


Comment:

Marking as a duplicate of #18392 because this change is a part of proposed
[https://github.com/django/django/pull/8886 PR].

--
Ticket URL: <https://code.djangoproject.com/ticket/31016#comment:1>

Django

unread,
Nov 21, 2019, 7:31:42 AM11/21/19
to django-...@googlegroups.com
#31016: Documentation: MySQL notes: utf8.
-------------------------------------+-------------------------------------
Reporter: minusf | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Documentation | Version: master
Severity: Normal | Resolution: duplicate
Keywords: mysql mariadb utf8 | Triage Stage:
utf8mb4 | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by minusf):

Well if django cannot support `utf8mb4` out of the box at the moment, then
I would argue it's even more important to have a warning about it in the
same section of the documentation...

--
Ticket URL: <https://code.djangoproject.com/ticket/31016#comment:2>

Reply all
Reply to author
Forward
0 new messages