This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lemburg
Recipients ezio.melotti, lemburg, vstinner
Date 2010-09-29.06:54:18
SpamBayes Score 1.0463852e-12
Marked as misclassified No
Message-id <4CA2E2A9.7050609@egenix.com>
In-reply-to <1285719650.86.0.122072445011.issue9979@psf.upfronthosting.co.za>
Content
STINNER Victor wrote:
> 
> New submission from STINNER Victor <victor.stinner@haypocalc.com>:
> 
> PyUnicode_AsWideChar() doesn't merge surrogate pairs on a system with 32 bits wchar_t and Python compiled in narrow mode (sizeof(wchar_t) == 4 and sizeof(Py_UNICODE) == 2) => see issue #8670.
> 
> It is not easy to fix this problem because the callers of PyUnicode_AsWideChar() suppose that the output (wide character) string has the same length (in character) than the input (PyUnicode) string (suppose that sizeof(wchar_t) == sizeof(Py_UNICODE)). And PyUnicode_AsWideChar() doesn't write nul character at the end if the output string is truncated.
> 
> To prepare this change, a new PyUnicode_AsWideCharString() function would help because it does compute the size of the output buffer (whereas PyUnicode_AsWideChar() requires the output buffer in an argument).

Great idea !
History
Date User Action Args
2010-09-29 06:54:21lemburgsetrecipients: + lemburg, vstinner, ezio.melotti
2010-09-29 06:54:20lemburglinkissue9979 messages
2010-09-29 06:54:18lemburgcreate