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

Mark Dickinson report at bugs.python.org
Tue Feb 24 20:39:50 CET 2009

Mark Dickinson <dickinsm at gmail.com> added the comment:

Updated Victor's patch:

  - applies cleanly against newly whitespace-normalized unicodeobject.c
  - add defined(SIZEOF_WCHAR_T) check

I find the patched version of PyUnicode_FromWideChar quite hard to follow 
with all the #ifdefery.  I wonder whether it might be better to define a 
_PyUnicode16_FromWideChar32 helper function instead.

Added file: http://bugs.python.org/file13166/unicode_fromwidechar_surrogate-5.patch

Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list