News for hackers. Stuff that matters.
Re:The History and rationale of the Python 3 Unicode model f... by LegionMammal978 on Wednesday December 14, 2022 @05:22PM (#33991506)
Python already has the "surrogateescape" error handler [0] that performs something similar to what you described: undecodable bytes are translated into unpaired U+DC80 to U+DCFF surrogates. Of course, this isn't standardized in any way, but I've found it useful myself for smuggling raw pathnames through Java.

[0] https://peps.python.org/pep-0383/

Re:The History and rationale of the Python 3 Unicode model f... by mmastrac on Wednesday December 14, 2022 @09:11PM (#33994167)
Thanks for this reference! It's exactly what I was thinking.