[issue13452] PyUnicode_EncodeDecimal: reject error handlers different than strict

2011-11-25 Thread STINNER Victor
STINNER Victor added the comment: Hum, I only changed PyUnicode_EncodeDecimal in Python 3.3, I prefer to not touch stable releases (2.7, 3.2). New changeset a20fae95618c by Victor Stinner in branch 'default': Close #13093: PyUnicode_EncodeDecimal() doesn't support error handlers http://hg.pyth

[issue13452] PyUnicode_EncodeDecimal: reject error handlers different than strict

2011-11-22 Thread STINNER Victor
STINNER Victor added the comment: > I'm only using the function with the NULL error handler. I don't think that anyone uses it without something else. The function is used to prepare a string input for a function converting a string to an integer. I don't see how xmlcharrefreplace can be usef

[issue13452] PyUnicode_EncodeDecimal: reject error handlers different than strict

2011-11-22 Thread Stefan Krah
Stefan Krah added the comment: I'm only using the function with the NULL error handler. If I had to use 'xmlcharrefreplace', presumably I'd overallocate 'output' for the worst case scenario: sizeof("�") per encoded character. It's hard to tell if people are using this feature. PyUnicode_EncodeD

[issue13452] PyUnicode_EncodeDecimal: reject error handlers different than strict

2011-11-22 Thread STINNER Victor
New submission from STINNER Victor : Error handling of PyUnicode_EncodeDecimal() is broken by design. The caller cannot know the size of the output buffer because each error handler produce a variable output, whereas the caller has to allocate this buffer and it is not possible to specify the