Re: Is there a solution in Django?

2006-02-12 Thread PythonistL

Jakub,
Thanks for your reply.
I found out that I can not use ALTER DATABASE `db_name` DEFAULT
CHARACTER SET utf8 COLLATE utf8_general_ci
after I create the database.
If I do not, then I can use utf-8 coding and it works well.However, I
do not know why.:-(
Regards,
L.



Re: Is there a solution in Django?

2006-02-12 Thread Jakub Labath

Hi,

This seems more like a postgres problem more than a django one.
It would appear that you have data in different charsets (bad idea).
What I would do is just dump the data (convert them to utf8 if needed
- see iconv) and then restore everything in a utf8 database.

1. pg_dump -U someuser blah >blah.sql;
2. (iconv on blah.sql - maybe review the file for charset and
collation definitions)
3. drop database blah;
4. create database blah with encoding 'utf-8';
5. psql -U someuser blah
6. \i blah.sql

Hope this helps and obviously make proper backups before you try this.

Good luck


On 2/9/06, PythonistL <[EMAIL PROTECTED]> wrote:
>
> Hi
> Because I use non English characters
> I used:
>  ALTER DATABASE `db_name` DEFAULT CHARACTER SET utf8 COLLATE
> utf8_general_ci
>
> but  now, when I want to insert some values into the database, I get
> the error:
>
> (1267, "Illegal mix of collations (utf8_general_ci,IMPLICIT) and
> (latin1_swedish_ci,COERCIBLE) for operation '='")
>
> How can I solve that?
> Thank you for help
> L.B.
>
>


Is there a solution in Django?

2006-02-09 Thread PythonistL

Hi
Because I use non English characters
I used:
 ALTER DATABASE `db_name` DEFAULT CHARACTER SET utf8 COLLATE
utf8_general_ci

but  now, when I want to insert some values into the database, I get
the error:

(1267, "Illegal mix of collations (utf8_general_ci,IMPLICIT) and
(latin1_swedish_ci,COERCIBLE) for operation '='")

How can I solve that?
Thank you for help
L.B.