From: <R.R...@ve...> - 2004-06-15 11:28:29
|
Hello if have a function which converts uft-16 to latin-1 import codecs def Uni2Latin(datei): try: inFile = codecs.open(datei, 'r', encoding="utf-16") outFile = codecs.open(datei+'.txt', 'w', encoding="Latin-1") lines = inFile.readlines() outFile.writelines(lines) inFile.close() outFile.close() return True except: return False This works fine, but if I use this func. in a program made by py2exe this functions is not able to open a utf-16 files. Any advice would be appreciated Thanks richard rossbach |