/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/mail_client.py

  • Committer: Vincent Ladeuil
  • Date: 2008-10-02 06:18:42 UTC
  • mfrom: (3757 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3759.
  • Revision ID: v.ladeuil+lp@free.fr-20081002061842-4ctag1pkr7ua9gu2
Fix conflict. Related to moved lines, nice use case

Show diffs side-by-side

added added

removed removed

Lines of Context:
191
191
        :return:    encoded string if u is unicode, u itself otherwise.
192
192
        """
193
193
        if isinstance(u, unicode):
194
 
            return u.encode(bzrlib.user_encoding, 'replace')
 
194
            return u.encode(osutils.get_user_encoding(), 'replace')
195
195
        return u
196
196
 
197
197
    def _encode_path(self, path, kind):
205
205
        """
206
206
        if isinstance(path, unicode):
207
207
            try:
208
 
                return path.encode(bzrlib.user_encoding)
 
208
                return path.encode(osutils.get_user_encoding())
209
209
            except UnicodeEncodeError:
210
210
                raise errors.UnableEncodePath(path, kind)
211
211
        return path