FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 02-14-2011, 12:37 PM
Klaus Ethgen
 
Default 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}
";'
~> LC_CTYPE=en_GB.utf-8 perl -e 'print "x{00a3}
";' | 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+I4UXXNKso2hhr6BEjg n/o0IOpbI6/jhe
YwSf5rysUlb924NvtdOc1VzLoOff/uUDXOpW0VICSJMZRfVLZvVvdwaysa+SJj/f
0UL0CnuHogtan5uV627JFQRI5/VpQ9LXRc7w6w0+Eh8d7Pm/FJYomI4fuGAM0jPo
n1mFCeHSP2PiSIJ85cKWCqxsDkC4EDrPvrqol2ZJfuW1bVqqVi GWMIrQ8RXzQ8JD
eSBHY0qjOCoMz1W46C4ruk3SVkX6FGe/V9U6XUG9kcAYlfpMyfeHDQ207P1tuEUH
dmD9gFA8ZpUgxHSZY43ONBnJlFynubPv7bmWoic7sez6V8zab6 TFqg==
=KrXl
-----END PGP SIGNATURE-----


--
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
 
Old 02-14-2011, 01:02 PM
Philipp Kern
 
Default 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
 
Old 02-14-2011, 01:15 PM
Lars Wirzenius
 
Default 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
 
Old 02-14-2011, 01:33 PM
Jakub Wilk
 
Default OT: Python (was: Make Unicode bugs release critical?)

* Klaus Ethgen <Klaus@Ethgen.de>, 2011-02-14, 14:37:

~> LC_CTYPE=en_GB.utf-8 perl -e 'print "x{00a3}
";'
~> LC_CTYPE=en_GB.utf-8 perl -e 'print "x{00a3}
";' | cat


Let me try...

$ LC_CTYPE=en_GB.utf-8 perl -e 'print "x{00a3}
";' | isutf8
stdin: line 1, char 1, byte offset 1: invalid UTF-8 code


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
 
Old 02-14-2011, 01:34 PM
Klaus Ethgen
 
Default 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)

iQEVAwUBTVk9hZ+OKpjRpO3lAQoy7Qf9EV1erqhNsAgfJ1ubQi itzufbk5Wq4rA/
rVh+Tpn4SHTE3D5Sw20UIPrUYonaQD6z8gokOkIdvzvgzVOBj3 vPioFnWZy368QK
DUXymUPal23q+iwwV8FYNqq7ggnwpnT0DX1PNCmMUHZl21ZkMj MJO2cuv21ycD6I
JGBvA0w+dOVb7YfI+HGMwAlyT2gEkT7nsg8nlvYUU+EgzCaXjC 1tdPHfe3QAYsQh
Pd0QDqhxFvwVRB9SskSas1JnjUh5DKMI/USr7a/+jP6dWeVQHIRglIN5uNFCq8kW
70jM2XCdTeZcdFy1lOiJ07YCYW1gg0kKCN+DlyEFJmJUzYsfP+ 4KsQ==
=H8Sg
-----END PGP SIGNATURE-----


--
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
 
Old 02-14-2011, 01:36 PM
Adam Borowski
 
Default 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
 

Thread Tools




All times are GMT. The time now is 04:09 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org