Re: [Django] #6517: manage.py dbshell does not get charset from database_options

10 views
Skip to first unread message

Django

unread,
Sep 10, 2011, 10:38:53 PM9/10/11
to django-...@googlegroups.com
#6517: manage.py dbshell does not get charset from database_options
-------------------------------------+-------------------------------------
Reporter: tvrg | Owner: nobody
Type: Bug | Status: new
Milestone: | Component: Database layer
Version: SVN | (models, ORM)
Resolution: | Severity: Normal
Triage Stage: Accepted | Keywords:
Needs documentation: 0 | Has patch: 1
Patch needs improvement: 0 | Needs tests: 1
UI/UX: 0 | Easy pickings: 0
-------------------------------------+-------------------------------------
Changes (by carljm):

* ui_ux: => 0
* easy: => 0
* stage: Design decision needed => Accepted


Comment:

We should look into whether this is needed on other backends as well, not
just MySQL.

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

Django

unread,
Jul 7, 2012, 9:54:42 AM7/7/12
to django-...@googlegroups.com
#6517: manage.py dbshell does not get charset from database_options
-------------------------------------+-------------------------------------
Reporter: tvrg | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: master
(models, ORM) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 0
Needs tests: 1 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by jpichon):

* cc: julie@… (added)


Comment:

I adapted tvrg's patch to the current codebase -
https://github.com/jpichon/django/compare/ticket_6517

I also tested dbshell with the sqlite3 and postgresql backends, and it
works with UTF-8 characters without patching.

There are other ways to get the MySQL backend to play nicely with UTF-8
that don't require changing the code. You can add "default-character-set =
utf8" to /etc/mysql/my.cnf on the server side, or create an option file
with the UTF-8 charset config and update the settings to point to it in
the "read_default_file" database options (as seen on
https://docs.djangoproject.com/en/dev/ref/databases/#connecting-to-the-
database)

{{{
[client]
default-character-set = utf8
}}}

If the patch option is preferred, I'm happy to work on the tests if
someone could let me know where the dbshell tests live.

--
Ticket URL: <https://code.djangoproject.com/ticket/6517#comment:6>

Django

unread,
Jul 9, 2012, 12:05:41 PM7/9/12
to django-...@googlegroups.com
#6517: manage.py dbshell does not get charset from database_options
-------------------------------------+-------------------------------------
Reporter: tvrg | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: master
(models, ORM) | Resolution:
Severity: Normal | Triage Stage: Design
Keywords: | decision needed
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by jpichon):

* stage: Accepted => Design decision needed


--
Ticket URL: <https://code.djangoproject.com/ticket/6517#comment:7>

Django

unread,
Mar 22, 2013, 6:20:41 PM3/22/13
to django-...@googlegroups.com
#6517: manage.py dbshell does not get charset from database_options
-------------------------------------+-------------------------------------
Reporter: tvrg | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: master
(models, ORM) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 0

Needs tests: 1 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by akaariai):

* stage: Design decision needed => Accepted


Comment:

Seems like a good idea to me.

--
Ticket URL: <https://code.djangoproject.com/ticket/6517#comment:8>

Django

unread,
Jul 25, 2015, 12:15:19 PM7/25/15
to django-...@googlegroups.com
#6517: manage.py dbshell does not get charset from database_options
-------------------------------------+-------------------------------------
Reporter: tvrg | Owner: vkmc
Type: Bug | Status: assigned

Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by vkmc):

* cc: victoria@… (added)
* owner: nobody => vkmc
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/6517#comment:9>

Django

unread,
Jul 31, 2015, 2:24:25 PM7/31/15
to django-...@googlegroups.com
#6517: MySQL: manage.py dbshell does not get charset from DATABASES setting

-------------------------------------+-------------------------------------
Reporter: tvrg | Owner: vkmc
Type: Bug | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by timgraham):

A tests can be added in `tests/dbshell/test_mysql.py`.

--
Ticket URL: <https://code.djangoproject.com/ticket/6517#comment:10>

Reply all
Reply to author
Forward
0 new messages