#2584 closed defect (worksforme)
no MySQL codepage select
Reported by: | 235 | Owned by: | Adrian Holovaty |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Django works only with utf8 codepage in MySQL, it's great problem with using it in others codepages.
In django/db/backends/mysql/base.py hardcode defined MySQL codepage.
if self.connection.get_server_info() >= '4.1': cursor.execute("SET NAMES utf8")
There only one possibility to change it manualy. Other variant is to move this option out to settings.py as MYSQL_CODEPAGE or try to extract this data from DEFAULT_CHARSET, as it was recommended on local forum:
from django.config import settings ... if self.connection.get_server_info() >= '4.1': cs = settings.DEFAULT_CHARSET.replace('-', '') cursor.execute("set character set %s" % cs)
Change History (5)
comment:1 by , 18 years ago
Resolution: | → duplicate |
---|---|
Severity: | major → normal |
Status: | new → closed |
comment:2 by , 18 years ago
Ohh, great, but we still haven't that path applied in SVN code. That defect was reported 9 month ago.
We've spend an hour to find this bug, and it would be very pleasant to apply it.
comment:3 by , 18 years ago
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
comment:4 by , 18 years ago
Resolution: | → worksforme |
---|---|
Status: | reopened → closed |
still duplicate of #952 ...
Duplicate of #952.