mercurial/crecord.py
changeset 45032 a65c60f3280e
parent 45025 47a07bbf400a
child 45034 4a503c1b664a
--- a/mercurial/crecord.py	Thu Jun 25 11:22:34 2020 +0200
+++ b/mercurial/crecord.py	Sun Jun 28 17:49:14 2020 +0200
@@ -10,6 +10,7 @@
 
 from __future__ import absolute_import
 
+import locale
 import os
 import re
 import signal
@@ -565,6 +566,9 @@
     """
     ui.write(_(b'starting interactive selection\n'))
     chunkselector = curseschunkselector(headerlist, ui, operation)
+    # This is required for ncurses to display non-ASCII characters in
+    # default user locale encoding correctly.  --immerrr
+    locale.setlocale(locale.LC_ALL, '')
     origsigtstp = sentinel = object()
     if util.safehasattr(signal, b'SIGTSTP'):
         origsigtstp = signal.getsignal(signal.SIGTSTP)