Mercurial > public > mercurial-scm > hg
comparison mercurial/encoding.py @ 13051:120eccaaa522
encoding: fix typo in variable name
The typo had no real effect, except for an unnecessary UTF-8 encoding.
author | Martin Geisler <mg@aragost.com> |
---|---|
date | Mon, 29 Nov 2010 10:13:55 +0100 |
parents | 7cc4263e07a9 |
children | b7b26e54e37a |
comparison
equal
deleted
inserted
replaced
13050:3790452d499b | 13051:120eccaaa522 |
---|---|
93 """ | 93 """ |
94 | 94 |
95 for e in ('UTF-8', fallbackencoding): | 95 for e in ('UTF-8', fallbackencoding): |
96 try: | 96 try: |
97 u = s.decode(e) # attempt strict decoding | 97 u = s.decode(e) # attempt strict decoding |
98 if u == 'UTF-8': | 98 if e == 'UTF-8': |
99 return localstr(s, u.encode(encoding, "replace")) | 99 return localstr(s, u.encode(encoding, "replace")) |
100 else: | 100 else: |
101 return localstr(u.encode('UTF-8'), | 101 return localstr(u.encode('UTF-8'), |
102 u.encode(encoding, "replace")) | 102 u.encode(encoding, "replace")) |
103 except LookupError, k: | 103 except LookupError, k: |