STINNER Victor <[email protected]> added the comment:
> Why was the change necessary?
First because unicode_decode_call_errorhandler() was called with the wrong
argument count:
1.90 - v, &outpos, &out))
1.91 + v, &outpos))
decode_code_page_errors() calls MultiByteToWideChar() which expects a wchar_t*
buffer.
Compute the maximum character requires to decode the full string. I prefer to
work on a wchar_t* string to only decode surrogate pairs and computer the
maximum character once.
decode_code_page_errors() can also be called on a substring of a longer string,
decode_code_page_strict() can be called for the other part.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue13377>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com