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.
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)
--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110214133736.GB6167@ikki.ethgen.ch">http://lists.debian.org/20110214133736.GB6167@ikki.ethgen.ch
02-14-2011, 01:02 PM
Philipp Kern
OT: Python (was: Make Unicode bugs release critical?)
On 2011-02-14, Klaus Ethgen <Klaus@Ethgen.de> wrote:
> ~> LC_CTYPE=en_GB.utf-8 perl -e 'print "x{00a3}
";'
> ~> LC_CTYPE=en_GB.utf-8 perl -e 'print "x{00a3}
";' | cat
> Both gives the same result, a '£' sign as expected.
And what's the value in that demonstration? Yes, you can treat UTF8 like a
bytestream. And the thread was about the problems that can arise of this.
Kind regards
Philipp Kern
--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: slrnilidf3.11r.trash@kelgar.0x539.de">http://lists.debian.org/slrnilidf3.11r.trash@kelgar.0x539.de
02-14-2011, 01:15 PM
Lars Wirzenius
OT: Python (was: Make Unicode bugs release critical?)
On ma, 2011-02-14 at 14:37 +0100, Klaus Ethgen wrote:
> lets start a python rant. I love to hate this language. :-)
Let's not.
Let's not rant about any languages, or tools, or desktop environments.
Let's be constructive on Debian mailing lists, shall we?
We have plenty of side-channels for rants, sarcasm, snide remarks,
passive-aggressiveness, and other forms of anti-social behavior, let's
use those instead.
--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1297692931.31960.13.camel@tacticus">http://lists.debian.org/1297692931.31960.13.camel@tacticus
02-14-2011, 01:33 PM
Jakub Wilk
OT: Python (was: Make Unicode bugs release critical?)
* Klaus Ethgen <Klaus@Ethgen.de>, 2011-02-14, 14:37:
But I don't blame Perl for that. It's documented behavior, so I can
either live with that or use another language.
--
Jakub Wilk
--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110214143302.GA6400@jwilk.net">http://lists.debian.org/20110214143302.GA6400@jwilk.net
02-14-2011, 01:34 PM
Klaus Ethgen
OT: Python (was: Make Unicode bugs release critical?)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Am Mo den 14. Feb 2011 um 15:15 schrieb Lars Wirzenius:
> On ma, 2011-02-14 at 14:37 +0100, Klaus Ethgen wrote:
> > lets start a python rant. I love to hate this language. :-)
>
> Let's not.
'Till here it is personal desire.
> Let's not rant about any languages, or tools, or desktop environments.
> Let's be constructive on Debian mailing lists, shall we?
You are true. I just couldn't resist if someone was trying to blame all
other than the one that has the bug.
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)
--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110214143445.GD6167@ikki.ethgen.ch">http://lists.debian.org/20110214143445.GD6167@ikki.ethgen.ch
02-14-2011, 01:36 PM
Adam Borowski
OT: Python (was: Make Unicode bugs release critical?)
On Mon, Feb 14, 2011 at 02:02:11PM +0000, Philipp Kern wrote:
> On 2011-02-14, Klaus Ethgen <Klaus@Ethgen.de> wrote:
> > ~> LC_CTYPE=en_GB.utf-8 perl -e 'print "x{00a3}
";'
> > ~> LC_CTYPE=en_GB.utf-8 perl -e 'print "x{00a3}
";' | cat
> > Both gives the same result, a '£' sign as expected.
>
> And what's the value in that demonstration? Yes, you can treat UTF8 like a
> bytestream. And the thread was about the problems that can arise of this.
Er, and tell me where exactly it makes sense to allow one encoding but not
another for a "bytestream"?
It appears that Python has a nasty bug where it ignores the encoding if
isatty(stdout) returns 0. So let's go fixing or reporting that rather than
arguing about it.
--
1KB // Microsoft corollary to Hanlon's razor:
// Never attribute to stupidity what can be
// adequately explained by malice.
--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110214143608.GA8419@angband.pl">http://lists.debian.org/20110214143608.GA8419@angband.pl