Python 3 is killing Python

Marko Rauhamaa marko at pacujo.net
Wed Jul 16 17:48:18 CEST 2014


Chris Angelico <rosuav at gmail.com>:

> On Thu, Jul 17, 2014 at 12:39 AM, Marko Rauhamaa <marko at pacujo.net> wrote:
>> In other words, the well-meaning Python3 blindly obeys the locale even
>> though I "simply stipulated" that my input is UTF-8.
>
> Except that you didn't - that input was not UTF-8. When you put a text
> string as redirected input and then change LANG, you're lying to the
> system, and you deserve all you get. Why are you even doing this,
> other than to be able to point and laugh at programs that do the wrong
> thing - when you've instructed them wrongly?

The example was artificial to make it small enough. The point is,
though, that it is dangerous to assume that the file formats agree with
the locale.


Marko



More information about the Python-list mailing list