Bug: click.format filename regression — surrogate escapes cause UnicodeEncodeError when printing filenames
Bug: click.format filename regression — surrogate escapes cause UnicodeEncodeError when printing filenames: a task in LegoFlow-SWE (Harbor dataset). On non-Windows platforms, Python's filesystem encoding uses the 'surrogateescape' error handler by default. This means that filenames with…
The task
On non-Windows platforms, Python's filesystem encoding uses the `'surrogateescape'` error handler by default. This means that filenames with non-Unicode bytes (e.g., `b'foo\xe9'`) are decoded into Python strings containing surrogate characters (e.g., `'foo\udce9'`).
Part of Lego-X/LegoFlow-SWE.