aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>1994-12-06 04:23:42 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>1994-12-06 04:23:42 +0000
commit62c83be30c944d3cd407a6815f3cda27855b9096 (patch)
tree540fe43e42b349fb208602b5e040e92c3b4f4804 /gnu
parent1d4039c723a517591acb51d83f92a9a8b5486efb (diff)
downloadsrc-62c83be30c944d3cd407a6815f3cda27855b9096.tar.gz
src-62c83be30c944d3cd407a6815f3cda27855b9096.zip
8bit locale ajustment fix
Notes
Notes: svn path=/head/; revision=4999
Diffstat (limited to 'gnu')
-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 e15a037452ac..930a0a87eb64 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;