
19 Jan
2011
19 Jan
'11
4:52 p.m.
Alexander Lamaison wrote: [about fopen]
Are you saying this is how it should be or this is how it is? Because, on Windows, 'name' certainly can't be UTF-8! The implementation takes 'name' to be in the default local codepage, uses mbstowchar to up-convert it to a UCS2 wchar_t string and delegates it to _wfopen (or similar - I'm doing this from memory).
For what it's worth, it doesn't, it calls CreateFileA. This may or may not produce the same result as what you describe, depending on whether the current C locale matches the ANSI code page.