os.walk the apostrophe and unicode
Peter Otten
__peter__ at web.de
Sun Jun 25 02:57:47 EDT 2017
Steve D'Aprano wrote:
> On Sun, 25 Jun 2017 07:17 am, Peter Otten wrote:
>
>> Then I'd fix the name manually...
>
> The file name isn't broken.
>
>
> What's broken is parts of the OP's code which assumes that non-ASCII file
> names are broken...
Hm, the OP says
'06 - Todd\xe2\x80\x99s Song (Post-Spiderland Song in Progress).flac'
Shouldn't it be
'06 - Todd’s Song (Post-Spiderland Song in Progress).flac'
if everything worked correctly? Though I don't understand why the OP doesn't
see
'06 - Toddâ\x80\x99s Song (Post-Spiderland Song in Progress).flac'
which is the repr() that I get.
More information about the Python-list
mailing list