Re: [AD] Allegro unable to deal with non ascii filenames

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


>> I could look into the python source to see how they get the encoding,
>> but AFAICS they do guessing, and glibc uses environment variables
>> to avoid guessing incorrectly.
>>     
>
> What is your locale string? We can try to detect an encoding allegro
> supports out of it maybe. E.g. if the environment variable "LC_ALL" or
> "LANG" has the substring "UTF-8" in it, we use U_UTF8. If it has
> "ISO8859-1" in it, we use U_ASCII. So as long as it is an encoding
> supported by Allegro, it should work. With my patch, your testcase
> already should work if you set the file encoding to U_ASCII - all it's
> missing is the auto-detection. With that in place, the two functions can
> be made internal functions.
>
>   
What if Allegro tried to write out a UTF8 file, or something, at startup
and then read it back in using a variety of methods until one of them
works. Then Allegro will know what the default character set is for that
user. Is this the sort of guessing python does?

Sorry if this doesn't make any sense, I probably didn't follow the
thread too well.




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