[New-bugs-announce] [issue21808] 65001 code page not supported

Maries Ionel Cristian report at bugs.python.org
Thu Jun 19 12:59:05 CEST 2014


New submission from Maries Ionel Cristian:

cp65001 is purported to be an alias for utf8.

I get these results:

C:\Python27>chcp 65001
Active code page: 65001

C:\Python27>python
Python 2.7.6 (default, Nov 10 2013, 19:24:24) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale

LookupError: unknown encoding: cp65001
>>>

LookupError: unknown encoding: cp65001
>>> locale.getpreferredencoding()

LookupError: unknown encoding: cp65001
>>>




And on Python 3.4 chcp doesn't seem to have any effect:

C:\Python34>chcp 65001
Active code page: 65001

C:\Python34>python
Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:38:22) [MSC v.1600 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.getpreferredencoding()
'cp1252'
>>> locale.getlocale()
(None, None)
>>> locale.getlocale(locale.LC_ALL)
(None, None)

----------
components: Interpreter Core, Unicode, Windows
messages: 220964
nosy: ezio.melotti, haypo, ionel.mc
priority: normal
severity: normal
status: open
title: 65001 code page not supported
versions: Python 2.7, Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21808>
_______________________________________


More information about the New-bugs-announce mailing list