utf8 -> w_char's (Provide some dummy solutión for values >2^16, e.g. c & 0xFFFF)
Don't use the dummy solution; Windows uses UTF-16.
w_char's -> chars via wcstombs()
No, Windows uses UTF-16. This step is unnecessary and harmful.
You know a good deal more than me about Window's internals. I thougth that within w_char strings on Windows each character represented itself. wcstombs() is affected by the locale settings. According to the C
The opposite is true: Windows never uses locale information for filenames (it always uses UTF-16 de facto), but the locale is used on Linux.
I supposed it was used BOTH on Windows an Linux, but that on Linux it was never necessary due to it using UTF-8 naturally. I had noticed that the C run-time doc's from Visual Studio does not mention anything about encodings for fopen or other filename related fuction, but supposed the char* filename was interpreted according to the locale settings. But... given that the string has to be passed to UTF-16 it must be interpreted somehow, isn't it? (You may not forward the reply to the list, since this question is rather unrelated to luatex but to Windows internals, or you may not answer at all). Regards, -- Javier M.