New submission from Christian Häggström <[EMAIL PROTECTED]>: If current working directory contains non-ascii characters, calling os.path.abspath(u".") will result in an error. I expect it to call the underlying os.getcwdu() in this case.
>>> import os >>> os.path.abspath(u".") Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/packages/python-2.5.1/x86-linux/lib/python2.5/posixpath.py", line 403, in abspath path = join(os.getcwd(), path) File "/home/packages/python-2.5.1/x86-linux/lib/python2.5/posixpath.py", line 65, in join path += '/' + b UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 29: ordinal not in range(128) It works if I do it manually, using os.getcwdu(): >>> os.path.join(os.getcwdu(), u".") u'/disk1/chn_local/work/test/sk\xe4rg\xe5rds\xf6-latin1/.' ---------- components: Unicode messages: 70148 nosy: saturn_mimas severity: normal status: open title: os.path.abspath with unicode argument should call os.getcwdu type: behavior versions: Python 2.4, Python 2.5 _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3426> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com