/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/diff.py

  • Committer: INADA Naoki
  • Date: 2010-02-26 11:15:03 UTC
  • mto: (5074.5.1 fix-523746-dev)
  • mto: This revision was merged to the branch mainline in revision 5892.
  • Revision ID: songofacandy@gmail.com-20100226111503-9gd0duk8ju6nrq5q
Append comment for why decode() needed before replace().

Show diffs side-by-side

added added

removed removed

Lines of Context:
723
723
            fenc = 'mbcs'
724
724
        else:
725
725
            fenc = sys.getfilesystemencoding()
 
726
        # encoded_str.replace('?', '_') may break multibyte char.
 
727
        # So we should encode, decode, then replace(u'?', u'_')
726
728
        relpath_tmp = relpath.encode(fenc, 'replace').decode(fenc, 'replace')
727
729
        relpath_tmp = relpath_tmp.replace(u'?', u'_')
728
730
        full_path = osutils.pathjoin(self._root, prefix, relpath_tmp)