diff -r e453c69821f8 -r b677bccf74b9 mercurial/pure/charencode.py --- a/mercurial/pure/charencode.py Mon Feb 21 10:47:08 2022 -0700 +++ b/mercurial/pure/charencode.py Mon Feb 21 10:47:31 2022 -0700 @@ -67,10 +67,7 @@ raise ValueError -if pycompat.ispy3: - _utf8strict = r'surrogatepass' -else: - _utf8strict = r'strict' +_utf8strict = r'surrogatepass' def jsonescapeu8fallback(u8chars, paranoid):