3 ms·
I don't think you can write a standard ANSI C program on Windows that opens a file specified on the command line where the file name contains characters not rep
by slrz 9y ago
I don't think you can write a standard ANSI C program on Windows that opens a file specified on the command line where the file name contains characters not representable in whatever legacy charset Windows is using at the moment.
At least that's what the situation was for many years. The article hints at some UTF8-related changes in Windows 10.
For almost every other system, the obvious code (fopen(argv[1], ...), basically) does the right thing. On Windows you have to enter some crazy non-portable parallel universe where not even the signature of main() is the same.
That's the reason why many programs don't support Unicode on Windows, despite there often being no reason for those programs to care about character encoding at all.
- pjmlp 9y agoPOSIX has zero support for GUI code or proper Unicode, of course it requires platform specific APIs, even if the target platform would be fully POSIX compliant.