mercurial/crecord.py
branchstable
changeset 42659 701341f57ceb
parent 42573 9ac1a5a4a64f
child 43076 2372284d9457
--- a/mercurial/crecord.py	Mon Jul 22 19:10:59 2019 -0700
+++ b/mercurial/crecord.py	Thu Jul 25 21:28:29 2019 +0900
@@ -29,10 +29,6 @@
 )
 stringio = util.stringio
 
-# This is required for ncurses to display non-ASCII characters in default user
-# locale encoding correctly.  --immerrr
-locale.setlocale(locale.LC_ALL, r'')
-
 # patch comments based on the git one
 diffhelptext = _("""# To remove '-' lines, make them ' ' lines (context).
 # To remove '+' lines, delete them.
@@ -530,6 +526,9 @@
     """
     ui.write(_('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, r'')
     origsigtstp = sentinel = object()
     if util.safehasattr(signal, 'SIGTSTP'):
         origsigtstp = signal.getsignal(signal.SIGTSTP)