Hi Duncan Webb wrote: > I've a question about Python's Unicode handling and hope that someone > can help.
Unicode in Python sucks! > First, when a string is a Unicode string does this mean that every > character is 2 or 4 bytes wide? No idea. > Second, file names from a fat system seem to be in latin1 but on the > ext2/3 are in utf8. How can they be processed in a safe way without > causing UnicodeErrors? They are? That should not be the case. There is a system variable what your defualt encoding is and what the filesytem encoding is. To avoid errors in any kind, kaa.beacon uses strings for filenames all the time, everything else is unicode. I suggest you do the same. > This is related to the new library module in freevo-1, Wout and I are > having trouble fixing it to work in all cases. One solution would be to use str_to_unicode and unicode_to_str from kaa.strutils (part of kaa.base). The code is similar to the Unicode and String functions in freevo 1.x. But I'm not sure it will be correct in any case for filenames, so you should keep them as they are. Dischi -- "If the Start Windows Restart when Windows starts check box is checked Windows Restart will start automatically every time Windows is started." - Actual excerpt from a windows program help file!
pgpslTk6JCxRi.pgp
Description: PGP signature
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ Freevo-devel mailing list Freevo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-devel