3 ms·
Seems like you might as well use Private Use Area characters[0] and keep things valid UTF-8. (Yes, you will have problems with paths that contain PUA character
by amake 3y ago
Seems like you might as well use Private Use Area characters[0] and keep things valid UTF-8.
(Yes, you will have problems with paths that contain PUA characters. But people have pointed out that paths aren't necessarily valid UTF-8, so you can't inline-encode your way out of this anyway. PUA characters are likely vanishingly less common than spaces, so you still mostly solve the problem.)
[0] https://en.wikipedia.org/wiki/Private_Use_Areas https://en.wikipedia.org/wiki/Private_Use_Areas