--- a/mercurial/crecord.py Thu Jun 25 03:46:07 2020 +0200
+++ b/mercurial/crecord.py Sun Jun 28 18:02:45 2020 +0200
@@ -10,7 +10,6 @@
from __future__ import absolute_import
-import locale
import os
import re
import signal
@@ -574,14 +573,12 @@
"""
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)
try:
- curses.wrapper(chunkselector.main)
+ with util.with_lc_ctype():
+ curses.wrapper(chunkselector.main)
if chunkselector.initexc is not None:
raise chunkselector.initexc
# ncurses does not restore signal handler for SIGTSTP