Hi Radomir,

> So when I changed the encoding in the sql file from LATIN1 to UTF-8 I get 
> import errors:
>
> (1 row)
>
> ERROR:  invalid byte sequence for encoding "UTF8": 0xe9 0x67 0x75
> CONTEXT:  COPY locations_location, line 31
>  setval 

Well, this is not a UTF8 sequence, but probably iso-8859-1. Why do you
want to import it again, at all, after it was correct in the database,
according to your mail from  Thu, 22 Aug 2013 00:02:50 -0700?

>
>
> So what encoding can I use that is safe with french accents but at the same 
> time can be used in django no problem? LATIN1 was ok in MYSQL

UTF8 is fine for French with all characters, even Œ, œ and Ÿ.


You wrote earlier:


> messages.error(request, "Sé")  
>
>         And now:
>
>         Non-ASCII character '\xc3' in file 
>         /var/web/mandala_env/mandala/alarms/views.py on line 329, but no 
> encoding 
>         declared; see http://www.python.org/peps/pep-0263.html for details 
>         (views.py, line 329

This means that you need to declare the encoding of your source code
like this on the top of each file when you use non-ASCII characters in
your source.

# -*- coding: <encoding name> -*-

I don't see the realtion of this message to changing the database
engine.


Kind regards

Michael

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to