--- Dirk Meyer <[EMAIL PROTECTED]> escreveu: > Gustavo Sverzut Barbieri wrote: > > I'm using utf8 in my fs and as I'm brazilian I have some chars that > > break it too, like "á"(á). When it doesn't break, it display > > wrong chars in menus. > > I'll work on this later. The solution seems to understand the LC > > environment variables and then encode() to fix it. > > A better solution would be to work with utf8 internally and > convert > > every item to it. > > I have some problems with utf-8 chars, e.g. a character outside the > 128 Bit range, but a valid latin-1 char couldn't be transformed to > unicode using encode. But print worked. So I can only say: good luck, > you need it.
yes, I really need it! Today I spent half day debugin unicode + utf8 in a PyQT tutorial I'm trying to make, so I can teach some friends how to develop rapid GUIs using Linux. Man, it's quite hard to understand the logic. But you need the codecs, unicode( string, "utf8" ), unicode( string, "latin-1" ), and stuff. But you need to know how the data was encoded so you can transform it to unicode. Example: Save a file "file_iso8859-1" with iso8859-1 chars. Then run the following code: f = open( "file_iso8859-1", "r" ).read() print f print unicode( f, "iso8859-1" ) If you use an unicode terminal you'll see the first line with weird chars, and the second line as expected (the chars converted to unicode). Gustavo ______________________________________________________________________ Yahoo! GeoCities: a maneira mais fácil de criar seu web site grátis! http://br.geocities.yahoo.com/ ------------------------------------------------------- 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