[issue23676] Add support of UnicodeTranslateError in standard error handlers

2015-03-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: issue18814 -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue23676] Add support of UnicodeTranslateError in standard error handlers

2015-03-26 Thread STINNER Victor
STINNER Victor added the comment: Serhiy Storchaka added the comment: > str.encode, bytes.decode and str.translate are unrelated to > UnicodeTranslateError. But str.transform could be. Can you please give an example of Python code to show your change? -- __

[issue23676] Add support of UnicodeTranslateError in standard error handlers

2015-03-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: str.encode, bytes.decode and str.translate are unrelated to UnicodeTranslateError. But str.transform could be. -- ___ Python tracker ___

[issue23676] Add support of UnicodeTranslateError in standard error handlers

2015-03-26 Thread STINNER Victor
STINNER Victor added the comment: I'm sorry, I don't understand this issue. Could you please elaborate the use case? Why do you want to support more error handlers? str.translate() calls _PyUnicode_TranslateCharmap() with errors="ignore", it's not possible to choose the error handler. Many co

[issue23676] Add support of UnicodeTranslateError in standard error handlers

2015-03-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: No, currently UnicodeTranslateError is not used in the stdlib in 3.x. But it is documented and supported by some error handlers. I think it should be wider used in text-to-text translations similar to proposed in issue18814. -- assignee: -> serhiy.s

[issue23676] Add support of UnicodeTranslateError in standard error handlers

2015-03-22 Thread Martin Panter
Martin Panter added the comment: I think I saw your patch for Issue 18814 proposes to use UnicodeTranslateError. Is there any other case where it is used, either currently or in the past? All I know of it is the documentation, which says it is raised “during translating”. Experimenting with th

[issue23676] Add support of UnicodeTranslateError in standard error handlers

2015-03-19 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue23676] Add support of UnicodeTranslateError in standard error handlers

2015-03-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Fixed a bug in "surrogatepass" with translating and added the versionchanged directive. -- Added file: http://bugs.python.org/file38504/translate_error_handlers_2.patch ___ Python tracker

[issue23676] Add support of UnicodeTranslateError in standard error handlers

2015-03-15 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Proposed patch adds support of UnicodeTranslateError in standard error handlers "xmlcharrefreplace", "namereplace" and "surrogatepass". Support in "backslashreplace" was added in issue22286, support in "strict", "ignore" and "replace" was always, support i