Re: MySQL 4.1.x charset support

2006-03-23 Thread Julian 'Julik' Tarkhanov

http://code.djangoproject.com/ticket/952

On 22-mrt-2006, at 6:54, ak wrote:

>
> Thanks, posted: http://code.djangoproject.com/ticket/1528


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers
-~--~~~~--~~--~--~---



Re: MySQL 4.1.x charset support

2006-03-23 Thread Julian 'Julik' Tarkhanov

I file a much broader patch for thus about a few months ago. Check  
out the tickets.

On 22-mrt-2006, at 6:54, ak wrote:

>
> Thanks, posted: http://code.djangoproject.com/ticket/1528

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers
-~--~~~~--~~--~--~---



Re: MySQL 4.1.x charset support

2006-03-21 Thread ak

Thanks, posted: http://code.djangoproject.com/ticket/1528


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers
-~--~~~~--~~--~--~---



Re: MySQL 4.1.x charset support

2006-03-21 Thread Russell Keith-Magee

On 3/21/06, ak <[EMAIL PROTECTED]> wrote:
>
> I wrote a small path to fix this problem. Does anyone need it ? Where
> should I post it ?

Hi Anton,

If you have found a bug, log a ticket at
http://code.djangoproject.com/newticket, and mark the issue as a
defect.

Before you log your bug, have a quick read of

http://www.djangoproject.com/documentation/contributing/

which are the guidelines for submitting bugs, patches, etc.

Russ Magee %-)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers
-~--~~~~--~~--~--~---



MySQL 4.1.x charset support

2006-03-21 Thread ak

Hello guys

After playing with Django 0.91 I've found that it behaves not 100%
correct when MySQL 4.1 is used.
File django/core/db/backends/mysql.py contains code:

if self.connection.get_server_info() >= '4.1':
cursor.execute("SET NAMES utf8")

It means that unicode will be always forced when MySQL 4.1 is used but
this may be wrong ! For example I have a russian site which I want to
move to Django. I already have ready html templates and they are in
windows-1251 encoding and I am able to use them with my data when I run
SET NAMES cp1251 without any recoding BUT Django doesnt allow me to do
the same because unicode support is hardcoded.
I wrote a small path to fix this problem. Does anyone need it ? Where
should I post it ?
It's quite simple and just adds a new parameter to the settings file
which is used only when MySQL 4.1 is used (DATABASE_CHARSET) and by
default it is "utf8" to support backwards compatibility.
I think it should be put into upstream. Shouldnt it ?

diff
/usr/lib/python2.3/site-packages/Django-0.91-py2.3.egg/django/core/db/backends/mysql.py
/usr/lib/python2.3/site-packages/Django-0.91-py2.3.egg/jango/core/db/backends/mysql.py.orig
56c56
< from django.conf.settings import DATABASE_USER,
DATABASE_NAME, DATABASE_HOST, DATABASE_PORT, DATABASE_PASSWORD,
DATABASE_CHARSET, DEBUG
---
> from django.conf.settings import DATABASE_USER, DATABASE_NAME, 
> DATABASE_HOST, DATABASE_PORT, DATABASE_PASSWORD, DEBUG
70c70
< cursor.execute("SET NAMES %s" % DATABASE_CHARSET)
---
> cursor.execute("SET NAMES utf8")


diff
/usr/lib/python2.3/site-packages/Django-0.91-py2.3.egg/django/conf/global_settings.py
/usr/lib/python2.3/site-packages/Django-0.91-py2.3.egg/django/conf/global_settings.py.orig
83d82
< DATABASE_CHARSET = 'utf8' # Used with MySQL 4.1.x and higher


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers
-~--~~~~--~~--~--~---