Message9408

Author pekka.klarck
Recipients amak, fwierzbicki, pekka.klarck, pjenvey, zyasoft
Date 2015-01-16.13:35:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1421415333.06.0.201223703318.issue1658@psf.upfronthosting.co.za>
In-reply-to
Content
This seems to be worse in 2.7 than in 2.5. I just reproduced this scenario with 2.7b4 preview on Windows 7:

1) Have a directory `xxx` with a subdirectory `日本語`.

2) Run `jython -c "import shutil; shutil.rmtree(u'xxx')"`

3) End result:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\jython2.7b4-soft\Lib\shutil.py", line 252, in rmtree
    onerror(os.remove, fullname, sys.exc_info())
  File "C:\jython2.7b4-soft\Lib\shutil.py", line 250, in rmtree
    os.remove(fullname)
OSError: [Errno 21] Is a directory: u'xxx\\\u65e5\u672c\u8a9e'


With Jython 2.5.3 the above works just fine. It works also with Python 2.7, but interesting it fails with WindowsError if I give the path as str and not unicode. With Jython versions str vs. unicode doesn't seem to have any difference.
History
Date User Action Args
2015-01-16 13:35:33pekka.klarcksetmessageid: <1421415333.06.0.201223703318.issue1658@psf.upfronthosting.co.za>
2015-01-16 13:35:33pekka.klarcksetrecipients: + pekka.klarck, fwierzbicki, amak, pjenvey, zyasoft
2015-01-16 13:35:32pekka.klarcklinkissue1658 messages
2015-01-16 13:35:32pekka.klarckcreate