PythonistL wrote:
> Which file should I change with
>  if self.connection.get_server_info() >= '4.1':
>   cursor.execute("SET NAMES utf8") ?
>

you should change all files with this entry
like this:
cursor.execute("SET NAMES <my encoding>")

> Scater,
> the erorr says:
> Exception Value: (1267, "Illegal mix of collations
> (utf8_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for
> operation '='")

so i have same error with cp1251 encoding
i am from Ukraine (cp1251) so i have this solution:

in mysql config:
[mysqld]
default-character-set = cp1251
default-collation = cp1251_ukrainian_ci
init-connect="SET NAMES cp1251"

for my database:
create database dbase charset=cp1251;

in code:
cursor.execute("SET NAMES cp1251")

you must change my <cp1251> with your encoding (latin1_swedish ? i
don't really know the name of encoding of your country)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to