[issue5127] UnicodeEncodeError - I can't even see license
report at bugs.python.org
Tue Oct 6 22:41:40 CEST 2009
Marc-Andre Lemburg <mal at egenix.com> added the comment:
It's not as easy as that.
The functions for case conversion are used in a way that assumes they
never fail (and indeed, the existing functions cannot fail).
What we can do is change the input parameter to Py_UCS4, but not the
Py_UNICODE output parameter, since that would cause lots of compiler
warnings and implicit truncation on UCS2 builds, which would be a pretty
However, this change would not really help anyone if there are no
mappings from BMP to non-BMP or vice-versa, so I'm not sure whether this
whole exercise is worth the effort.
It appears to be better to just leave the case mapping APIs unchanged -
or am I missing something ?
The situation is different for the various Py_UNICODE_IS*() APIs: for
these we can change the input parameter to Py_UCS4, remove the name
mangling and add UCS2 helper functions to maintain API compatibility on
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list