﻿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
1121	Wrong default-character-set in MySQL 4.1x/5.x (win32)	hipertracker@…	Adrian Holovaty	"Django do not correctly display content from MySQL 4.1x, 5.x for win32. It always assume using latin1_swedish_ci
as default encoding instead of using settings (default-character-set=utf8) in my.ini.

'''Solution:'''

In Django-0.90-py2.4.egg\django\core\db\backends\mysql.py 
change method cursor():

    def cursor(self):
...
		# OLD code:
        # if DEBUG:
        #    return base.CursorDebugWrapper(MysqlDebugWrapper(self.connection.cursor()), self)
        #return self.connection.cursor()
        
        # NEW code:
        if self.connection.get_server_info() >= '4.1':
	        cursor = self.connection.cursor()
    	    cursor.execute(""SET NAMES utf8"")
	        if DEBUG:
    	        return base.CursorDebugWrapper(MysqlDebugWrapper(cursor), self)
        return cursor    "	defect	closed	Core (Other)	0.90	major	fixed	mysql, encoding		Unreviewed	0	0	0	0	0	0
