Python's 8-bit cleanness deprecated?
Kirill Simonov
kirill_simonov at mail.ru
Fri Feb 7 17:07:18 EST 2003
* John Roth <johnroth at ameritech.net>:
>
> After thinking about this for a few days, it suddenly occured to me
> that there may be a very obscure method in this madness. That is, by
> restricting python source to 7-bit ascii unless otherwise declared,
> it opens the way to migrate to UTF-8 input. This, in turn, would
> solve most of the character set problems in one fell swoop.
>
Why do you think that UTF-8 is a panacea?
For example, my little script
print "Привет!"
will become
print u"Привет!".encode('koi8-r')
if I am forced to use UTF-8 for my source code. I don't see any
advantage here.
Yes, I know that I should use gettext. Actually, I do. But what should
do a 12-year-old student that writes her first script?
I have another question. How could I define the input encoding
for the interactive interpreter?
--
xi
More information about the Python-list
mailing list