New submission from Serhiy Storchaka <storch...@gmail.com>:

Yet one inconsistency in charmap codec.

>>> import codecs
>>> codecs.charmap_decode(b'\x00', 'strict', '\U0002000B')
('𠀋', 1)
>>> codecs.charmap_decode(b'\x00', 'strict', {0: '\U0002000B'})
('𠀋', 1)
>>> codecs.charmap_decode(b'\x00', 'strict', {0: 0x2000B})
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: character mapping must be in range(65536)

The suggested patch removes this unnecessary limitation in charmap decoder.

----------
components: Interpreter Core
files: decode_charmap_maxchar.patch
keywords: patch
messages: 165688
nosy: storchaka
priority: normal
severity: normal
status: open
title: Charmap decoding of no-BMP characters
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file26412/decode_charmap_maxchar.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15379>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to