2 ms·
> Operating systems do not enforce valid UTF-8 on filenames. Should they? There is no difference from a file system perspective. We'd still run into problems e
by matheusmoreira 7y ago
> Operating systems do not enforce valid UTF-8 on filenames.
Should they? There is no difference from a file system perspective. We'd still run into problems even if they did: the line feed is a valid UTF-8 character and is one of the characters with special meaning in many programs.
Dealing with file names properly is a chore even on bash.
https://mywiki.wooledge.org/BashPitfalls https://mywiki.wooledge.org/BashPitfalls
- rini17 7y agoIt looks to me OP thinks we should "because it's pain otherwise". My own opinion is more like - it is tied to C paradigm (where you don't have any reliable runtime typing/encoding info, everything is just a bag of bytes), and it can't really be solved without moving on to something else. Not sure if that ever happens.
- skissane 7y ago> We'd still run into problems even if they did: the line feed is a valid UTF-8 character and is one of the characters with special meaning in many programs. They could ban new line from file names too. See this proposal: http://austingroupbugs.net/view.php?id=251 http://austingroupbugs.net/view.php?id=251