equal
deleted
inserted
replaced
205 except UnicodeDecodeError: |
205 except UnicodeDecodeError: |
206 u = s.decode("utf-8", "replace") # last ditch |
206 u = s.decode("utf-8", "replace") # last ditch |
207 # can't round-trip |
207 # can't round-trip |
208 return u.encode(_sysstr(encoding), "replace") |
208 return u.encode(_sysstr(encoding), "replace") |
209 except LookupError as k: |
209 except LookupError as k: |
210 raise error.Abort(k, hint=b"please check your locale settings") |
210 raise error.Abort( |
|
211 pycompat.bytestr(k), hint=b"please check your locale settings" |
|
212 ) |
211 |
213 |
212 |
214 |
213 def fromlocal(s): |
215 def fromlocal(s): |
214 # type: (bytes) -> bytes |
216 # type: (bytes) -> bytes |
215 """ |
217 """ |