OT: Python (was: Make Unicode bugs release critical?)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Hi,
lets start a python rant. I love to hate this language. :-)
Am Mo den 14. Feb 2011 um 14:14 schrieb Jakub Wilk:
> >$ LC_CTYPE=en_GB.utf-8 python -c 'print u"\u00a3"'
> ><unicode pound sign>
[...]
> >$ LC_CTYPE=en_GB.utf-8 python -c 'print u"\u00a3"' | cat
> >Traceback (most recent call last):
> > File "<string>", line 1, in <module>
> >UnicodeEncodeError: 'ascii' codec can't encode character u'\xa3' in
> >position 0: ordinal not in range(128)
>
> This is the expected behaviour. Incidentally, it has nothing to do
> with UTF-8. You'll get the same result if you use a locale with a
> legacy encoding.
I see. It is funny to see python lovers to blame other for the bugs in
the language.
~> LC_CTYPE=en_GB.utf-8 perl -e 'print "\x{00a3}\n";'
~> LC_CTYPE=en_GB.utf-8 perl -e 'print "\x{00a3}\n";' | cat
Both gives the same result, a '£' sign as expected.
> * Ian Jackson <ijackson@chiark.greenend.org.uk>, 2011-02-14, 12:42:
> >Excellent, I look forward to the removal of python. I always
> >hated that language anyway.
I hate them more. :-)
Regards
Klaus
- --
Klaus Ethgen http://www.ethgen.ch/
pub 2048R/D1A4EDE5 2000-02-26 Klaus Ethgen <Klaus@Ethgen.de>
Fingerprint: D7 67 71 C4 99 A6 D4 FE EA 40 30 57 3C 88 26 2B
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iQEVAwUBTVkwIJ+OKpjRpO3lAQr9qAf+I4UXXNKso2hhr6BEjgn/o0IOpbI6/jhe
YwSf5rysUlb924NvtdOc1VzLoOff/uUDXOpW0VICSJMZRfVLZvVvdwaysa+SJj/f
0UL0CnuHogtan5uV627JFQRI5/VpQ9LXRc7w6w0+Eh8d7Pm/FJYomI4fuGAM0jPo
n1mFCeHSP2PiSIJ85cKWCqxsDkC4EDrPvrqol2ZJfuW1bVqqViGWMIrQ8RXzQ8JD
eSBHY0qjOCoMz1W46C4ruk3SVkX6FGe/V9U6XUG9kcAYlfpMyfeHDQ207P1tuEUH
dmD9gFA8ZpUgxHSZY43ONBnJlFynubPv7bmWoic7sez6V8zab6TFqg==
=KrXl
-----END PGP SIGNATURE-----
Reply to: