Hacker News new | past | comments | ask | show | jobs | submit login

> 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




> 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


It 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.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: