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 lieryan
Recipients lieryan
Date 2009年12月05日.10:40:55
SpamBayes Score 4.0036308e-12
Marked as misclassified No
Message-id <1260009658.59.0.0106753931217.issue7441@psf.upfronthosting.co.za>
In-reply-to
Content
maybe related to #6501
Vista 32-bit SP1, Python 3.1:
"""
Microsoft Windows [Version 6.0.6000]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.
D:\>chcp 65001
Active code page: 65001
D:\>python -c 'print("")'
Fatal Python error: Py_Initialize: can't initialize sys standard streams
LookupError: unknown encoding: cp65001
This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application's support team for more information.
D:\>python
Python 3.1.1 (r311:74483, Aug 17 2009, 17:02:12) [MSC v.1500 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
"""
Expected, either:
1. print nothing (""), or
2. python exception about unknown encoding, or
3. python exception about cannot encode to the encoding
cp65001 is supposed to be an alias for utf-8. Because of the error,
there is AFAICT no way to set the command prompt to accept utf-8 output
even for pipe redirection.
A workaround is to use sys.stdout.buffer.write() to write raw byte
strings, encoding manually. But this takes us back to python 2.
History
Date User Action Args
2009年12月05日 10:40:58lieryansetrecipients: + lieryan
2009年12月05日 10:40:58lieryansetmessageid: <1260009658.59.0.0106753931217.issue7441@psf.upfronthosting.co.za>
2009年12月05日 10:40:56lieryanlinkissue7441 messages
2009年12月05日 10:40:55lieryancreate

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