Mercurial > hg > mercurial-crew-with-dirclash
comparison hgext/convert/common.py @ 4965:4106dde15aed
Merge with crew
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sat, 21 Jul 2007 16:44:38 -0500 |
parents | cdd33a048289 |
children | 89fbb0a5e8e3 |
comparison
equal
deleted
inserted
replaced
4964:ee983d0dbea8 | 4965:4106dde15aed |
---|---|
58 raise NotImplementedError() | 58 raise NotImplementedError() |
59 | 59 |
60 def recode(self, s, encoding=None): | 60 def recode(self, s, encoding=None): |
61 if not encoding: | 61 if not encoding: |
62 encoding = self.encoding or 'utf-8' | 62 encoding = self.encoding or 'utf-8' |
63 | 63 |
64 try: | 64 try: |
65 return s.decode(encoding).encode("utf-8") | 65 return s.decode(encoding).encode("utf-8") |
66 except: | 66 except: |
67 try: | 67 try: |
68 return s.decode("latin-1").encode("utf-8") | 68 return s.decode("latin-1").encode("utf-8") |