[Tutor] UnicodeDecodeError when copying files with Umlauten

Severin Kacianka severin.kacianka at aon.at
Sun Jul 10 13:00:42 CEST 2005


Hello, 

I finally could solve the problem on my own. These two articles helped me a 
lot:
http://www.onlamp.com/pub/a/python/excerpt/pythonckbk_chap1/
http://www.reportlab.com/i18n/python_unicode_tutorial.html

I simply had to ensure that all the file names I got from the m3u file were in 
unicode format. I do that by simply running "unicode" over every filename I 
extract from the m3u files:
self.pathList.append(unicode(eachLine[:-1],"latin-1"))

Severin
-- 
They that can give up essential liberty to obtain a little temporary safety 
deserve neither liberty nor safety.
	Benjamin Franklin


More information about the Tutor mailing list