This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pepalogik
Recipients ezio.melotti, flox, georg.brandl, loewis, mark.dickinson, pepalogik, vstinner
Date 2013-02-07.12:26:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1360239992.22.0.369455240571.issue17137@psf.upfronthosting.co.za>
In-reply-to
Content
Knowing that the problem is related to the internal representation of the strings, I have written a short script which reproduces the problem. It is this simple:

import os
name = 'sub-fcc'
wrkdir = 'D:\\Bug reports\\Python\\test'
dirname = wrkdir+os.sep+name
print(dirname)
print(ascii(dirname.encode("unicode_internal")))
dirname += os.sep+'bulk'
print(dirname)
print(ascii(dirname.encode("unicode_internal")))

Output:

D:\Bug reports\Python\test\sub-fcc
b'D\x00:\x00\\\x00B\x00u\x00g\x00 \x00r\x00e\x00p\x00o\x00r\x00t\x00s\x00\\\x00P\x00y\x00t\x00h\x00o\x00n\x00\\\x00t\x00e\x00s\x00t\x00\\\x00s\x00u\x00b\x00-\x00f\x00c\x00c\x00'
D:\Bug reports\Python\test\sub-fcc\bulk
b'D\x00:\x00\\\x00B\x00u\x00g\x00 \x00r\x00e\x00p\x00o\x00r\x00t\x00s\x00\\\x00P\x00y\x00t\x00h\x00o\x00n\x00\\\x00t\x00e\x00s\x00t\x00\\\x00s\x00u\x00b\x00-\x00f\x00c\x00c\x00\x00\x00\x00\x00\xd8\xa3\x90\x02\x00\x00'

The end of the output varies from run to run.

It works correctly in Python 3.2.3 64-bit on Windows 8.
History
Date User Action Args
2013-02-07 12:26:32pepalogiksetrecipients: + pepalogik, loewis, georg.brandl, mark.dickinson, vstinner, ezio.melotti, flox
2013-02-07 12:26:32pepalogiksetmessageid: <1360239992.22.0.369455240571.issue17137@psf.upfronthosting.co.za>
2013-02-07 12:26:32pepalogiklinkissue17137 messages
2013-02-07 12:26:32pepalogikcreate