| ▲ | nilslindemann a day ago | |||||||
But isn't 'surrogateescape' supposed to address this? (no expert) | ||||||||
| ▲ | chrismorgan a day ago | parent [-] | |||||||
surrogateescape is something else altogether. It’s a hack to allow non-Unicode file names/environment variables/command line arguments in an otherwise-Unicode environment, by smuggling them through a part of the surrogate range (0x80 to 0xFF → U+DC80 to U+DCFF) which otherwise can’t occur (since it’s invalid Unicode). It’s a cunning hack that makes a lot of sense: they used a design error in one place (Python string representation) to cancel out a design error in another place (POSIX being late to the game on Unicode)! | ||||||||
| ||||||||