Re: Trouble with the encoding of os.getcwd() in Korean Windows

2005-02-09 Thread Walter Dörwald
Erik Bethke wrote: Hello All, sorry for all the posts... I am *almost* there now... okay I have this code: import sys, os encoding = locale.getpreferredencoding() htmlpath = os.getcwd() htmlpath = htmlpath.decode( encoding ) You might want to try os.getcwdu() instead of this. Acco

Re: Trouble with the encoding of os.getcwd() in Korean Windows

2005-02-09 Thread Erik Bethke
Wow, even more information. When I set my default browser to IE, it launches fine... so it is something about FireFox being more picky than IE... Where would I hunt down this sort of problem? Sounds rare, should I contact Mozilla, or can you guys spot something silly I am doing? Thank you, -Eri

Re: Trouble with the encoding of os.getcwd() in Korean Windows

2005-02-09 Thread Erik Bethke
Ah and PS, again this is only for paths that are non-aschii or at least have Korean in them... The broswer bit launches successfully in other locations. -Erik -- http://mail.python.org/mailman/listinfo/python-list

Re: Trouble with the encoding of os.getcwd() in Korean Windows

2005-02-09 Thread Erik Bethke
Hello All, sorry for all the posts... I am *almost* there now... okay I have this code: import sys, os encoding = locale.getpreferredencoding() htmlpath = os.getcwd() htmlpath = htmlpath.decode( encoding ) . write to the file . . file is written fine, and can be

Re: Trouble with the encoding of os.getcwd() in Korean Windows

2005-02-09 Thread Erik Bethke
Thank you Vincent, I will try this... I did get over my troubles with this new code snippet: encoding = locale.getpreferredencoding() htmlpath = os.getcwd() htmlpath = htmlpath.decode( encoding ) That seems to be working well too. I can write to these files and I can open the

Re: Trouble with the encoding of os.getcwd() in Korean Windows

2005-02-09 Thread Vincent Wehren
Erik Bethke wrote: Hello All, I have found much help in the google archives but I am still stuck... here is my code snippet: path = os.getcwd() path = path.decode('UTF8') Now the trouble is I am getting that darn UnicodeDecodeError, where it is tripping up on the Korean hangul for M

Re: Trouble with the encoding of os.getcwd() in Korean Windows

2005-02-09 Thread Erik Bethke
Hello All, Well as usual, after I post I keep on digging and I found the answer... http://cjkpython.i18n.org/ Has the encodings for Chinese, Korean and Japanese... and I took the hint that I found from the foundationstore and tried cp949 and wa-la! it works... Now, the question remains, how do

Trouble with the encoding of os.getcwd() in Korean Windows

2005-02-09 Thread Erik Bethke
Hello All, I have found much help in the google archives but I am still stuck... here is my code snippet: path = os.getcwd() path = path.decode('UTF8') Now the trouble is I am getting that darn UnicodeDecodeError, where it is tripping up on the Korean hangul for My Desktop. Now