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 | dexen |
|---|---|
| Recipients | dexen |
| Date | 2007年09月17日.16:20:38 |
| SpamBayes Score | 0.012659959 |
| Marked as misclassified | No |
| Message-id | <1190046038.92.0.0244946221114.issue1170@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
A quick paste to illustrate: the exception is raised only when unicode object is passed to shlex. Warning: the cStringIO module is unsuitable for use there, only the StringIO. cStringIO does not output unicode. dexen!muraena!~$ python Python 2.5.1 (r251:54863, May 4 2007, 16:52:23) [GCC 4.1.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from StringIO import StringIO >>> import shlex >>> lx = shlex.shlex( StringIO( unicode( "abc" ) ) ) >>> lx.get_token() u'abc' >>> lx = shlex.shlex( StringIO( unicode( "abc" ) ), None, True ) >>> lx.get_token() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.5/shlex.py", line 96, in get_token raw = self.read_token() File "/usr/lib/python2.5/shlex.py", line 150, in read_token elif nextchar in self.wordchars: UnicodeDecodeError: 'ascii' codec can't decode byte 0xdf in position 63: ordinal not in range(128) >>> |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2007年09月17日 16:20:39 | dexen | set | spambayes_score: 0.01266 -> 0.012659959 recipients: + dexen |
| 2007年09月17日 16:20:38 | dexen | set | spambayes_score: 0.01266 -> 0.01266 messageid: <1190046038.92.0.0244946221114.issue1170@psf.upfronthosting.co.za> |
| 2007年09月17日 16:20:38 | dexen | link | issue1170 messages |
| 2007年09月17日 16:20:38 | dexen | create | |