diff options
author | Guido van Rossum <guido@python.org> | 2002-10-09 18:17:06 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2002-10-09 18:17:06 (GMT) |
commit | 06e2a5e05275f814ec179d0c1dc2980cd237a521 (patch) | |
tree | 6fcea1556e7d2e309e793fdfec290adeadf18d7e /Objects/stringobject.c | |
parent | 8b10f8988f896754b36c17700bab5e435f943385 (diff) | |
download | cpython-06e2a5e05275f814ec179d0c1dc2980cd237a521.zip cpython-06e2a5e05275f814ec179d0c1dc2980cd237a521.tar.gz cpython-06e2a5e05275f814ec179d0c1dc2980cd237a521.tar.bz2 |
Add special consideration for rlcompleter. As a side effect of
initializing GNU readline, setlocale(LC_CTYPE, "") is called, which
changes the <ctype.h> macros to use the "default" locale (which isn't
the *initial* locale -- the initial locale is the "C" locale in which
only ASCII characters are printable). When the default locale is e.g.
Latin-1, the repr() of string objects can include 8-bit characters
with the high bit set; I believe this is due to the recent
PRINT_MULTIBYTE_STRING changes to stringobject.c. This in turn screws
up test_pyexpat and test_rotor, which depend on the repr() of 8-bit
strings with high bit characters.
The solution (for now) is to force the LC_CTYPE locale to "C" after
importing rlcompleter. This is the locale required by the test suite
anyway.
Diffstat (limited to 'Objects/stringobject.c')
0 files changed, 0 insertions, 0 deletions