From 27443bc0c8784fc2b38dd89bb5bb703de09c45be Mon Sep 17 00:00:00 2001 From: tg Date: Fri, 10 Nov 2006 05:27:43 +0000 Subject: [PATCH] skip on cesu-8, we think nl_langinfo(CODESET) at least will always return utf-8 for it (on wchar_t=16bit systems); 68t --- main.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/main.c b/main.c index 06e7ec4..c9d06e3 100644 --- a/main.c +++ b/main.c @@ -13,7 +13,7 @@ #include #endif -__RCSID("$MirOS: src/bin/mksh/main.c,v 1.55 2006/11/10 05:23:12 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/main.c,v 1.56 2006/11/10 05:27:43 tg Exp $"); extern char **environ; @@ -152,12 +152,10 @@ main(int argc, char *argv[]) /* Check if we're in an UTF-8 locale */ cc = setlocale(LC_CTYPE, ""); #if HAVE_LANGINFO_CODESET - if (strcasecmp(cc, "UTF-8") && strcasecmp(cc, "utf8") && - strcasecmp(cc, "CESU-8") && strcasecmp(cc, "cesu8")) + if (strcasecmp(cc, "UTF-8") && strcasecmp(cc, "utf8")) cc = nl_langinfo(CODESET); #endif - if (!strcasecmp(cc, "UTF-8") || !strcasecmp(cc, "utf8") || - !strcasecmp(cc, "CESU-8") || !strcasecmp(cc, "cesu8")) + if (!strcasecmp(cc, "UTF-8") || !strcasecmp(cc, "utf8")) Flag(FUTFHACK) = 1; #endif