On 18 avr, 05:16, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> Not really -- although in that case there would be slightly more value
> in adding the encoding line, since bytestrings that aren't UTF-8 encoded
> will break in interesting ways.
>
> My main reason for not adding this: if you forget to add the encoding
> line, Python gives you a very clear error message and explains what you
> need to do to fix it. Sometimes that alerts you to the fact that you've
> accidently included non-ASCII characters (e.g. via cut-and-paste) and
> need to actually check the encoding -- such as when you've pasted from a
> document in Windows. If we automatically include such a line and it's
> wrong for some reason (because you're in Japan and prefer to use
> shift-JIS, or you're cursed to use Windows, so CP-1152 is a way of
> life), things will sort of work and you'll get an unexpected decoding
> error way down the track. As a programmer who makes mistakes, I like the
> early warning system a bit better.

Ok it makes sense.

Thanks for your reply,
Nicolas


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to