[issue4474] PyUnicode_FromWideChar incorrect for characters outside the BMP (unix only)

Marc-Andre Lemburg report at bugs.python.org
Mon Dec 1 12:07:48 CET 2008


Marc-Andre Lemburg <mal at egenix.com> added the comment:

This is due to the function downcasting the wchar_t values to
Py_UNICODE, which is a 2-byte value if you build Python as UCS2 version
on Unix.

Most Unixes ship with UCS4 builds, so you don't see the problem there.
Mac OS X ships with a UCS2 build, which is why you run into the problem
on that platform.

UCS2 builds are also the default build on Unix, so if you compile Python
yourself, it will result in a UCS2 build, unless you explicitly specify
the UCS4 build configure option or configure happens to find a Tcl/Tk
version installed that uses UCS4 internally.

----------
nosy: +lemburg

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


More information about the Python-bugs-list mailing list