diff options
author | Michael Jennings <mej@kainx.org> | 2004-07-16 22:01:47 +0000 |
---|---|---|
committer | Michael Jennings <mej@kainx.org> | 2004-07-16 22:01:47 +0000 |
commit | 7ae8f07814b72fb301f57551f9b55a5fbf92bd66 (patch) | |
tree | b5780a906aacdfe6386cc36890beb97cf5da6d25 | |
parent | 9963e036588d8a1e7495f34fc1f24d40a6d3556e (diff) | |
download | eterm-7ae8f07814b72fb301f57551f9b55a5fbf92bd66.tar.gz |
Fri Jul 16 17:59:48 2004 Michael Jennings (mej)
If $LANG refers to a UTF-8 or similar locale, remove that part. In
other words, en_US.utf8 becomes en_US instead.
----------------------------------------------------------------------
SVN revision: 10868
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/feature.h | 3 | ||||
-rw-r--r-- | src/startup.c | 16 |
3 files changed, 23 insertions, 1 deletions
@@ -5236,3 +5236,8 @@ _NET_WM_ICON property. Fixed a couple warnings. ---------------------------------------------------------------------- +Fri Jul 16 17:59:48 2004 Michael Jennings (mej) + +If $LANG refers to a UTF-8 or similar locale, remove that part. In +other words, en_US.utf8 becomes en_US instead. +---------------------------------------------------------------------- diff --git a/src/feature.h b/src/feature.h index 4827ce0..78369d7 100644 --- a/src/feature.h +++ b/src/feature.h @@ -201,6 +201,9 @@ /* Allow option/attribute for Meta to set the 8th bit */ #define META8_OPTION +/* Attempt to deactivate UTF-8 and similar locales. */ +#define NO_UTF8_LOCALE + /********************* Miscellaneous options *********************/ /* To have $DISPLAY and the "\E[7n" response be IP addresses rather than FQDN's */ diff --git a/src/startup.c b/src/startup.c index 2b6cb5e..4f8ba20 100644 --- a/src/startup.c +++ b/src/startup.c @@ -76,7 +76,8 @@ eterm_bootstrap(int argc, char *argv[]) int i; char *val; - static char windowid_string[20], *display_string, *term_string; /* "WINDOWID=\0" = 10 chars, UINT_MAX = 10 chars */ + /* "WINDOWID=\0" = 10 chars, UINT_MAX = 10 chars */ + static char windowid_string[20], *display_string, *term_string; orig_argv0 = argv[0]; @@ -311,6 +312,19 @@ eterm_bootstrap(int argc, char *argv[]) } putenv("ETERM_VERSION=" VERSION); +#ifdef NO_UTF8_LOCALE + /* Check locale for UTF-8 and deactivate if needed. */ + val = getenv("LANG"); + if (val && *val) { + char *tmp; + + tmp = strcasestr(val, ".utf"); + if (tmp) { + *tmp = 0; + } + } +#endif + D_CMD(("init_command()\n")); init_command(rs_exec_args); |