Nick Coghlan added the comment: The use case is to take data from a surrogate escaped interface and either filter it out entirely or convert it to a valid Unicode string at the point of *input*, before letting it make its way into the rest of the application. For example, this approach permits the Python equivalent of the Linux console behaviour when it attempts to display the improperly encoded file name.
This approach is likely to be easier to implement in cross-platform code than dropping down to the bytes interfaces on POSIX systems and using the Unicode APIs on Windows. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18814> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com