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 ")
> Scater,
> the erorr says:
> Exception Value: (1267, "Illegal mix o
Hello Corey,
Thank you for your reply.
I do not like PHP and I prefer comand line.
So, after some testing I finally found out the command
ALTER TABLE `tablename ` CHANGE `fieldname` `fieldname` VARCHAR( 10 )
CHARACTER SET utf8 COLLATE utf8_czech_ci.
Regards,
L.
--~--~-~--~~
Believe it or not, latin1_swedish_ci is a default collation for MySQL.
I recommend using PHPMyAdmin. It is the easiest way to see the
collations and change the collations. (but you have to use PHP :( )
You can use the MySQL Administrator GUI but it is a pain as you have
to do a lot more clic
Corey,
Thank you for your reply.
The exception Value
(1267, "Illegal mix of collations (utf8_czech_ci,IMPLICIT) and
(latin1_swedish_ci,COERCIBLE) for operation '='")
is from this command:
gallerys.get_list(Title__exact=new_data['Title'])
So, I would guess that Title field or new_data['Title']
You can change to collation of your MySQL tables by table and by
field. If you do it by table, all new fields are of that collation.
If you already have fields of a collation, you will have to change
all of them.
I used PHPMyAdmin to do it as the interface is nice and simple. You
probably
Thank you for the reply
I still use Django 0.91 and I could not find
django/db/backends/mysql/base.py
I found only C:\Python23\Lib\site-packages\django\core\base.py
and C:\Python23\Lib\site-packages\django\core\db\mysql.py
Which file should I change with
if self.connection.get_server_info() >=
in mysql config:
[mysqld]
default-character-set = cp1251
default-collation = cp1251_ukrainian_ci
init-connect="SET NAMES cp1251"
for your database:
create database dbase charset=utf8;
and ...
in file django/db/backends/mysql/base.py
we have:
if self.connection.get_server_info() >= '4.1':
curs
Yes, you can use MySQL's CONVERT() or CAST() functions
(http://dev.mysql.com/doc/refman/5.0/en/charset-convert.html). As
limodou says - move everything to UTF-8, it'll save you hours of
hardwork later.
--Simon
--~--~-~--~~~---~--~~
You received this message becau
On 9/5/06, PythonistL <[EMAIL PROTECTED]> wrote:
>
> Limodou,
> Thank you for your reply.
> Is it possible to "convert" the field in MySQL instead of converting
> characters?
> Thank you for reply
> L
>
I don't know. I only use utf-8, so I havenot encountered your problem till now.
--
I like pyt
Limodou,
Thank you for your reply.
Is it possible to "convert" the field in MySQL instead of converting
characters?
Thank you for reply
L
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post
On 9/5/06, PythonistL <[EMAIL PROTECTED]> wrote:
>
> Hello ,
> I use MySQL with Django and it works great untill I try to insert
> non-English characters.Then I get
>
>
> (1267, "Illegal mix of collations (utf8_czech_ci,IMPLICIT) and
> (latin1_swedish_ci,COERCIBLE) for operation '='")
>
> How can
Hello ,
I use MySQL with Django and it works great untill I try to insert
non-English characters.Then I get
(1267, "Illegal mix of collations (utf8_czech_ci,IMPLICIT) and
(latin1_swedish_ci,COERCIBLE) for operation '='")
How can I correct this error?
Thank you for help
L.
--~--~-~--~-
12 matches
Mail list logo