﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
2584	no MySQL codepage select	235	Adrian Holovaty	"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)
}}}

"	defect	closed	Database layer (models, ORM)	dev	normal	worksforme			Unreviewed	0	0	0	0	0	0
