Show More
@@ -73,7 +73,7 b' configitem(' | |||
|
73 | 73 | default=lambda: encoding.encoding, |
|
74 | 74 | ) |
|
75 | 75 | |
|
76 |
_encoding = |
|
|
76 | _encoding: str = "" # see extsetup | |
|
77 | 77 | |
|
78 | 78 | |
|
79 | 79 | def decode(arg): |
@@ -129,7 +129,7 b' def basewrapper(func, argtype, enc, dec,' | |||
|
129 | 129 | except UnicodeError: |
|
130 | 130 | raise error.Abort( |
|
131 | 131 | _(b"[win32mbcs] filename conversion failed with %s encoding\n") |
|
132 | % _encoding | |
|
132 | % encoding.strtolocal(_encoding) | |
|
133 | 133 | ) |
|
134 | 134 | |
|
135 | 135 | |
@@ -199,7 +199,7 b' def extsetup(ui):' | |||
|
199 | 199 | return |
|
200 | 200 | # determine encoding for filename |
|
201 | 201 | global _encoding |
|
202 | _encoding = ui.config(b'win32mbcs', b'encoding') | |
|
202 | _encoding = encoding.strfromlocal(ui.config(b'win32mbcs', b'encoding')) | |
|
203 | 203 | # fake is only for relevant environment. |
|
204 | 204 | if _encoding.lower() in problematic_encodings.split(): |
|
205 | 205 | for f in funcs.split(): |
@@ -217,5 +217,6 b' def extsetup(ui):' | |||
|
217 | 217 | # extensions.loadall() is called. |
|
218 | 218 | if '--debug' in sys.argv: |
|
219 | 219 | ui.writenoi18n( |
|
220 |
b"[win32mbcs] activated with encoding: %s\n" |
|
|
220 | b"[win32mbcs] activated with encoding: %s\n" | |
|
221 | % encoding.strtolocal(_encoding) | |
|
221 | 222 | ) |
General Comments 0
You need to be logged in to leave comments.
Login now