[issue8941] utf-32be codec failing on 16-bit python build for 32-bit value

Dave Opstad report at bugs.python.org
Tue Jun 8 18:15:24 CEST 2010


New submission from Dave Opstad <dave.opstad at monotypeimaging.com>:

The utf-32 little-endian codec works fine, but the big-endian codec is producing incorrect results:

Python 3.1.2 (r312:79360M, Mar 24 2010, 01:33:18) 
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> str(b'\x00\x00\x01\x00', 'utf-32le') # works
'\U00010000'
>>> str(b'\x00\x01\x00\x00', 'utf-32be') # doesn't work
'\ud800\x02'

----------
components: Unicode
messages: 107326
nosy: opstad
priority: normal
severity: normal
status: open
title: utf-32be codec failing on 16-bit python build for 32-bit value
type: behavior
versions: Python 3.1

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


More information about the Python-bugs-list mailing list