Re: Managing non-ascii filenames in python

2009-07-20 Thread Martin v. Löwis
I thought the correct way to do this in python would be to scan the dir files=os.listdir(os.path.dirname( os.path.realpath( __file__ ) )) then print the filenames for filename in files: print filename but as expected teh filename is not correct - so correct it using the file sysytems

Managing non-ascii filenames in python

2009-07-19 Thread pdenize
I created the following filename in windows just as a test - “Dönåld’s™ Néphêws” deg°.txt The quotes are non -ascii, many non english characters, long hyphen etc. Now in DOS I can do a directory and it translates them all to something close. Dönåld'sT Néphêws deg°.txt I thought the correct way