> Multibyte encoding may contains '?' as a trailing char.
> So ``full_path.encode('mbcs', 'replace').replace('?', '_')`` may break
> multibyte char.
Really? Even SJIS avoids that one, and it's pretty good at breaking naïve programs. I get the reasoning now though.
> And I hate self._root or prefix is changed through encode().decode() and bzr
> attempts to write outside of _root.
> So I do:
> 1) Write temporary file with safe unicode path.
> 2) Launch external diff with encoded path.
Hm, I see. Probably overly cautious though, the windows filesystem layer will just be decoding by the system locale internally anyway.
> Multibyte encoding may contains '?' as a trailing char. path.encode( 'mbcs', 'replace' ).replace( '?', '_')`` may break
> So ``full_
> multibyte char.
Really? Even SJIS avoids that one, and it's pretty good at breaking naïve programs. I get the reasoning now though.
> And I hate self._root or prefix is changed through encode().decode() and bzr
> attempts to write outside of _root.
> So I do:
> 1) Write temporary file with safe unicode path.
> 2) Launch external diff with encoded path.
Hm, I see. Probably overly cautious though, the windows filesystem layer will just be decoding by the system locale internally anyway.