summaryrefslogtreecommitdiffstats
path: root/gnu/lib/libreadline
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1994-12-06 04:23:42 +0000
committerache <ache@FreeBSD.org>1994-12-06 04:23:42 +0000
commiteade49e148c4d4fdb249fd663bb143ea0c12aa6b (patch)
tree540fe43e42b349fb208602b5e040e92c3b4f4804 /gnu/lib/libreadline
parenta4fe90a250b63d3a1a94d716e876451fe786d866 (diff)
downloadFreeBSD-src-eade49e148c4d4fdb249fd663bb143ea0c12aa6b.zip
FreeBSD-src-eade49e148c4d4fdb249fd663bb143ea0c12aa6b.tar.gz
8bit locale ajustment fix
Diffstat (limited to 'gnu/lib/libreadline')
-rw-r--r--gnu/lib/libreadline/readline.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gnu/lib/libreadline/readline.c b/gnu/lib/libreadline/readline.c
index e15a037..930a0a8 100644
--- a/gnu/lib/libreadline/readline.c
+++ b/gnu/lib/libreadline/readline.c
@@ -921,7 +921,7 @@ _rl_kill_kbd_macro ()
/* Initliaze readline (and terminal if not already). */
rl_initialize ()
{
- char *t;
+ char *t, *t1;
/* If we have never been called before, initialize the
terminal and data structures. */
@@ -942,7 +942,11 @@ rl_initialize ()
/* Check for LC_CTYPE and use its value to decide the defaults for
8-bit character input and output. */
t = getenv ("LC_CTYPE");
- if (t && (strcmp (t, "iso-8859-1") == 0 || strcmp (t, "iso_8859_1") == 0))
+ t1 = getenv ("LANG");
+ if (t && (strstr (t, "8859-1") != NULL || strstr (t, "8859_1") != NULL ||
+ strstr (t, "KOI8-R") != NULL || strstr (t, "koi8-r") != NULL) ||
+ t1 && (strstr (t1, "8859-1") != NULL || strstr (t1, "8859_1") != NULL ||
+ strstr (t1, "KOI8-R") != NULL || strstr (t1, "koi8-r") != NULL))
{
_rl_meta_flag = 1;
_rl_convert_meta_chars_to_ascii = 0;
OpenPOWER on IntegriCloud