Re: [AD] Windows unicode filename support

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Chris napsal(a):
Leave it to Windows to supply older systems with functions that don't do anything for forwards "compatibility". Here's an alternative that uses the original _stat/_findfirst/etc, but passes it UTF-8 data instead. I doubt it'll work with the extended chars in Win9x (where I don't think they can have extended chars), but hopefully it'll work in WinNT/2K/XP. Can anyone test if it works properly with files that use extended characters? If not, then I guess I'll either figure something else out.

This patch makes no sense. ANSI Windows function expects strings in ANSI charset, not in UTF-8, so this patch does not work anywhere on Windows. File names can contain extended character even under Windows 95 (in fact even under DOS).

If you really (but IMHO it's not important for a game library) want to it correctly, convert it to U_UNICODE and the result pass to the WideCharToMultiByte with first parameter CP_ACP and then the result pass to the _stat & co. functions

--
Regards,
    Michal

ICQ# 175762750




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/