HomePhabricator

pycompat: stop setting LC_CTYPE unconditionally

Description

pycompat: stop setting LC_CTYPE unconditionally

Changeset a25343d16ebe aimed to align how LC_CTYPE is initialized across Python
versions. However, as Yuya Nishihara pointed out, it changes the behavior of
some str methods on Python 2.

Curses requires that LC_CTYPE is initialized correctly. Therefore LC_CTYPE is
set while curses is used and reset afterwards. It shouldn’t be a problem that
some str methods behave differently on Python 2 while curses is used. At least
it’s not a regression compared to what was done before d2227d4c9e6b.

This again breaks non-ASCII filenames passed to the Subversion bindings on
Python 2. Since it didn’t work before a25343d16ebe, it’s however not really a
regression. A separate patch will be sent.

Details

Committed
Manuel Jacob <me@manueljacob.de>Sat, Jun 27, 3:05 PM
Parents
rHG47a07bbf400a: crecord: stop trying to import wcurses
Branches
Unknown
Tags
Unknown