4 ms·
Sure we could declare that but then what? Non-unicode filenames won't suddenly disappear. Operating systems won't suddenly enforce unicode. Filesystems will sti
by ChrisSD 7y ago
Sure we could declare that but then what? Non-unicode filenames won't suddenly disappear. Operating systems won't suddenly enforce unicode. Filesystems will still allow non-unicode names.
Simply declaring it doesn't help anybody. In the meantime your application still needs to handle non-unicode filenames otherwise those malicious ones are free to be malicious.
- mark-r 7y agoOnce you lose the expectation of being able to work with non-unicode filenames, those files will quickly get renamed and cease to be a problem.
- AnIdiotOnTheNet 7y agoIf unicode had a set of "explictly this byte" codepoints, it should be simple to deal with, just pass the invalid bytes of the filename in that way.
- ygra 7y agoUnicode deals with text, so such a set of codepoints is a non-starter, anyway.
- bjourne 7y agoAs long as the tool for renaming files handles non-utf8 filenames you'd be fine.
- PeterisP 7y agoI'd assume that the proper place for defining what's a valid filename would be on the filesystem level, so a filesystem of standard ABC v123 would not allow non-unicode names; so non-unicode filenames would either get refused or modified upon copying/writing them to the filesystem. This is not new, this would match the current behavior of the OS/filesystem enforcing other character restrictions such as when writing (for example) a file name with an asterisk or colon to a FAT32 USB flash drive.