diff -r 2c6ebd0c850e -r de598e84c244 hgext/blackbox.py --- a/hgext/blackbox.py Wed Jan 10 21:27:05 2018 -0800 +++ b/hgext/blackbox.py Sun Jan 14 12:06:27 2018 -0800 @@ -44,6 +44,7 @@ from mercurial.node import hex from mercurial import ( + encoding, registrar, ui as uimod, util, @@ -182,7 +183,7 @@ fp.write(fmt % args) except (IOError, OSError) as err: self.debug('warning: cannot write to blackbox.log: %s\n' % - err.strerror) + encoding.strtolocal(err.strerror)) # do not restore _bbinlog intentionally to avoid failed # logging again else: