Gustavo Sverzut Barbieri wrote: > Hello, > > Just commited the necessary changes to support non latin-1 filenames. > > It Works-For-Me (TM) using LANG=pt_BR.UTF-8 and non-ascii (portuguese) > chars so it should work with others, please test. > I just tested the Video, Audio and Image modules, 'cause I don't have > games/commands modules, so if you have it and uses non-ascii chars, > please test.
I can't test it right now, but I also had the idea to do it. So you've done it, great. But I guess we need some testing, because I know there are some bad things in the string/unicode world: The default encoding in Python 2.3 is 'ascii'. You can't change that. If you have a string (when I say string, I mean str()) which non ascii chars (e.g. latin-1), you can't just run unicode(mystring), it would cause an UnicodeError, because Freevo want's to use the 'ascii' encoding. The correct way is unicode(mystring, 'latin-1') or in our case replace latin-1 with config.LOCALE. Now we can keep all internal strings as unicode. But the problem is also the way back. Some functions like os.X want string objects. You can pass string objects with non ascii characters, no problem, _but_ if you pass unicode objects with non ascii in it, it will use the default encoding (ascii again) and will raise an UnicodeError again. You did the starts changing all internal strings to Unicode, great. But we should search for the following stuff: Every string sthat goes into Freevo must be Unicode. If it comes from fxd files, this is no problem because the xml parser uses unicode. On the other hand, we have directory listings, you convert them to Unicode. I had some bad problems with that, let's see if you implementation works better than my first draft. Second is the outgoing. Every function needed a string, should get an Unicode object converted with the current locale. I read about unicdoe version od all os operations, but I couldn't find them. It will need some time to convert all parts of Freevo. This you use even non Latin-1 (what charset is it?), we should be able to trace all the bugs. But I expect Freevo to be unstable because of this for at least 2 weeks. But it had to be done sooner or later, so good work. Dischi -- No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced. ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Freevo-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-devel
