From 7ae8f07814b72fb301f57551f9b55a5fbf92bd66 Mon Sep 17 00:00:00 2001 From: Michael Jennings Date: Fri, 16 Jul 2004 22:01:47 +0000 Subject: 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 --- src/startup.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/startup.c') 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); -- cgit v1.2.1