Re: [AD] Windows unicode filename support

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


On Thursday 04 May 2006 13:37, Victor wrote:
> I wasn't very clear in my previous e-mail, sorry. I was refering to
> filenames with non-ansi characters passed down to allegro functions. In
> Win9x, filenames with non-ansi characters tends to be incorrectly
> interpreted by allegro (like as these files doesn't exist) [honestly i
> didn't tested this, since I don't have these old Windows around
> anymore, but if that is not the case so no one would be complaining
> about, or maybe i'm confused and missed completely the point].

No, that's how it is. Currently Allegro converts it to ASCII before calling 
the file functions.

> Everyone here know that Windows is something with highly weird and
> anti-crossplatform API with some stupid and buggy behavior in some
> places and there are plenty of known and unknown oddities. So it is
> obvious that trying to support this is hard. But if we can do support
> that, even if partially, we got an advance.

That's really what my patch does. By simply converting to/from UTF-16 instead 
of ASCII and using the _w* functions, Allegro can work with extended 
characters. Unfortunately those functions require WInNT/2K/XP and up. To get 
extended chars to work on Win9x, you'd need to use the 
MultiByteCharSomethingOrOther function, with dynamicly allocated strings. And 
even then, extended chars will only work properly if the target machine has 
the right codepage set.




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