[Tutor] special characters is changed in filename output? Why?
jeff at ccvcorp.com
Fri Aug 27 03:53:34 CEST 2004
Ole Jensen wrote:
> f = open("æøå.txt", "w")
> creates a file named: ‘›†.txt (I hope it show up correctly in this
> If I did the exact same code in IDLE the file name would be correct i.e.
There seems to be a difference in how IDLE and the command-line Python
interpreter handle locale -- this sort of thing seems to be a frequent
problem. The solution probably involves specifically setting locale
somewhere in your Python-startup process. Unfortunately, I don't know
enough about this to offer any more specific guidance -- I'm one of
those lazy Americans who has little cause to deal with non-ascii
More information about the Tutor