Help needed with filenames

2009-05-10 Thread pdenize
I have a program that reads files using glob and puts them into an XML file in UTF-8 using unicode(file, sys.getfilesystemencoding()).encode(UTF-8) This all works fine including all the odd characters like accents etc. However I also print what it is doing and someone pointed out that many

Re: Help needed with filenames

2009-05-10 Thread Martin v. Löwis
Can anyone tell me what I should be doing here? The console uses the OEM code page. The Windows conversion routine from Unicode to the OEM code page provides the lossy conversion that you observe in listing. Unfortunately, the OEM code page conversion is not available from Python. What you can

Re: Help needed with filenames

2009-05-10 Thread Yinon Ehrlich
I did notice that when a windows command window does a directory listing of these files the characters seem to be translated into close approximations (long dash to minus, special double quotes to simple double quotes, but still retains many of the accent chars).  I looked at translate to do