diff --git a/hgext/histedit.py b/hgext/histedit.py --- a/hgext/histedit.py +++ b/hgext/histedit.py @@ -201,7 +201,6 @@ except ImportError: termios = None import functools -import locale import os import struct @@ -1711,10 +1710,6 @@ def _chistedit(ui, repo, freeargs, opts) ctxs = [] for i, r in enumerate(revs): ctxs.append(histeditrule(ui, repo[r], i)) - # Curses requires setting the locale or it will default to the C - # locale. This sets the locale to the user's default system - # locale. - locale.setlocale(locale.LC_ALL, '') rc = curses.wrapper(functools.partial(_chisteditmain, repo, ctxs)) curses.echo() curses.endwin() diff --git a/mercurial/crecord.py b/mercurial/crecord.py --- a/mercurial/crecord.py +++ b/mercurial/crecord.py @@ -10,7 +10,6 @@ from __future__ import absolute_import -import locale import os import re import signal @@ -574,9 +573,6 @@ def chunkselector(ui, headerlist, operat """ 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)