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 piro
Recipients ezio.melotti, piro, ronaldoussoren, vstinner
Date 2010-07-06.12:16:50
SpamBayes Score 3.9489797e-07
Marked as misclassified No
Message-id <1278418613.43.0.267624770475.issue9167@psf.upfronthosting.co.za>
In-reply-to
Content
I've made some other test with LANG=C on other platforms. It seems resulting in a clean error on Linux:

$ LANG=C ./here/bin/python3
Python 3.2a0 (py3k, Jul  6 2010, 12:40:29) 
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys, os
>>> snowman = '\u2603'
>>> os.system((sys.executable + " -c 'import sys; print(sys.argv[-1].encode(\"utf8\"))' " + snowman).encode(sys.getdefaultencoding()))
Traceback (most recent call last):
  File "<string>", line 1, in <module>
UnicodeEncodeError: 'utf-8' codec can't encode character '\udce2' in position 0: surrogates not allowed
256

Notice that I had to use an explicit encoding or os.system would have tried to encode using ascii and barf, probably because of bug #8775.

I've also been reported about issue #4388: I've checked and test_run_code() fails as described. So I think this bug can be considered a #4388 duplicate.
History
Date User Action Args
2010-07-06 12:16:53pirosetrecipients: + piro, ronaldoussoren, vstinner, ezio.melotti
2010-07-06 12:16:53pirosetmessageid: <1278418613.43.0.267624770475.issue9167@psf.upfronthosting.co.za>
2010-07-06 12:16:51pirolinkissue9167 messages
2010-07-06 12:16:50pirocreate