On Feb 4, 9:18 am, Nohinder <nohin...@yahoo.com> wrote:
> Hello,
> i ran into this problem too, the solution was to specify the page coding
> from the very begining:
> " # -*- coding: latin-1 -*- "

This is for .py files, not templates.

> this is my first line in a .py file where i have/deal with special chars.
> it latin-1 does not work, try utf-8, although it should work

"programming by accident", eh ?

This declaration must match the encoding _effectively_ used to save
your .py file - else it won't work correctly (even if it seems to).

Hint : if you don't want to have encoding problems, enforce the use of
utf-8 on the *whole* production chain (source files encoding _and_
declaration, html files idem, webserver, database, etc). Lesson I
learned the hard way years ago...

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to