homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author fenner
Recipients fenner
Date 2009年09月24日.13:54:05
SpamBayes Score 4.5200647e-08
Marked as misclassified No
Message-id <1253800448.93.0.534160477927.issue6988@psf.upfronthosting.co.za>
In-reply-to
Content
In python 2.5, shlex handled unicode input fine:
Python 2.5.1 (r251:54863, Jun 15 2008, 18:24:51) 
[GCC 4.3.0 20080428 (Red Hat 4.3.0-8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import shlex
>>> shlex.split( u'Hello, World!' )
['Hello,', 'World!']
In python 2.6, shlex turns unicode input into UCS-4 output, thus utterly
confusing execl:
Python 2.6 (r26:66714, Jun 8 2009, 16:07:29)
[GCC 4.4.0 20090506 (Red Hat 4.4.0-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import shlex
>>> shlex.split( u'Hello, World' )
['H\x00\x00\x00e\x00\x00\x00l\x00\x00\x00l\x00\x00\x00o\x00\x00\x00,\x00\x00\x00',
'\x00\x00\x00W\x00\x00\x00o\x00\x00\x00r\x00\x00\x00l\x00\x00\x00d\x00\x00\x00']
Even weirder, the two return strings have different byte order (see
'H\x00\x00\x00' vs. '\x00\x00\x00W'!)
History
Date User Action Args
2009年09月24日 13:54:09fennersetrecipients: + fenner
2009年09月24日 13:54:08fennersetmessageid: <1253800448.93.0.534160477927.issue6988@psf.upfronthosting.co.za>
2009年09月24日 13:54:07fennerlinkissue6988 messages
2009年09月24日 13:54:05fennercreate

AltStyle によって変換されたページ (->オリジナル) /