3 ms·
But what do you care how they file names are stored on disk, as long as you can read directories and traverse paths using UTF-8?
by cryptonector 5y ago
But what do you care how they file names are stored on disk, as long as you can read directories and traverse paths using UTF-8?
- Aardwolf 5y agoThe only standard C functions that manage files use zero terminated byte strings as filenames. I'm not saying C made a great design choice here either, but the combination of this and Windows using UTF-16 makes it impossible to write code that can open a file that works on both windows, and other OSes, without OS-specific #ifdefs
- gary_0 5y agoThere is a lot of C/C++ code out there that breaks with Windows unicode filenames, although most mature software projects don't just naively use fopen. Some C libraries allow you to use UTF-8 filenames for all platforms and do the right thing internally, and I'm a big fan of that.