[Django] #32427: Fix MySQL example of CREATE DATABASE to use utf8mb4 character set

13 views
Skip to first unread message

Django

unread,
Feb 6, 2021, 10:25:57 PM2/6/21
to django-...@googlegroups.com
#32427: Fix MySQL example of CREATE DATABASE to use utf8mb4 character set
-----------------------------------------+------------------------
Reporter: Angus Holder | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 3.1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
MySQL's `utf8` encoding cannot store all unicode codepoints, only those
that will fit in 3 bytes (codepoints 0x0000 to 0xFFFF).
[https://stackoverflow.com/questions/30074492/what-is-the-difference-
between-utf8mb4-and-utf8-charsets-in-mysql See here for more info]

We should recommend the `utf8mb4` encoding, which fully supports unicode,
to avoid users running into cryptic errors like [https://www.eversql.com
/mysql-utf8-vs-utf8mb4-whats-the-difference-between-utf8-and-utf8mb4/
here]:

{{{
Incorrect string value: '\xF0\x9F\x98\x81...' for column 'data' at row 1
}}}

Pull request: https://github.com/django/django/pull/13984

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

Django

unread,
Feb 7, 2021, 3:13:25 AM2/7/21
to django-...@googlegroups.com
#32427: Fix MySQL example of CREATE DATABASE to use utf8mb4 character set
-------------------------------+--------------------------------------

Reporter: Angus Holder | Owner: nobody
Type: Bug | Status: closed
Component: Documentation | Version: master
Severity: Normal | Resolution: duplicate

Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Nick Pope):

* status: new => closed
* version: 3.1 => master
* resolution: => duplicate


Comment:

Marking as a duplicate of #31016 which was marked as a duplicate of
#18392.

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

Reply all
Reply to author
Forward
0 new messages