Mercurial > hg
diff mercurial/crecord.py @ 45002:d2227d4c9e6b
curses: do not initialize LC_ALL to user settings (issue6358)
701341f57ceb moved the setlocale() call to right before curses was used. This
didn’t fully solve the problem it was supposed to solve (locale-dependent
functions, like date formatting/parsing), but only postponed it.
Initializing LC_CTYPE seems to be sufficient for curses to work correctly.
Luckily this is already done at interpreter startup on modern Python versions
and, since recently, by Mercurial in the pycompat module in all other cases.
author | Manuel Jacob <me@manueljacob.de> |
---|---|
date | Fri, 26 Jun 2020 09:37:34 +0200 |
parents | d3f776c4760e |
children | 47a07bbf400a |
line wrap: on
line diff
--- a/mercurial/crecord.py Fri Jun 26 04:07:50 2020 +0200 +++ b/mercurial/crecord.py Fri Jun 26 09:37:34 2020 +0200 @@ -10,7 +10,6 @@ from __future__ import absolute_import -import locale import os import re import signal @@ -574,9 +573,6 @@ """ 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)