use strcasestr not strcasecmp, oops
costs 55t 4d 1i
This commit is contained in:
parent
a199d23dfa
commit
251243b253
6
main.c
6
main.c
@ -13,7 +13,7 @@
|
|||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.57 2006/11/10 06:27:09 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.58 2006/11/10 06:31:47 tg Exp $");
|
||||||
|
|
||||||
extern char **environ;
|
extern char **environ;
|
||||||
|
|
||||||
@ -152,10 +152,10 @@ main(int argc, char *argv[])
|
|||||||
/* Check if we're in an UTF-8 locale */
|
/* Check if we're in an UTF-8 locale */
|
||||||
cc = setlocale(LC_CTYPE, "");
|
cc = setlocale(LC_CTYPE, "");
|
||||||
#if HAVE_LANGINFO_CODESET
|
#if HAVE_LANGINFO_CODESET
|
||||||
if (strcasecmp(cc, "UTF-8") && strcasecmp(cc, "utf8"))
|
if (strcasestr(cc, "UTF-8") && strcasestr(cc, "utf8"))
|
||||||
cc = nl_langinfo(CODESET);
|
cc = nl_langinfo(CODESET);
|
||||||
#endif
|
#endif
|
||||||
if (!strcasecmp(cc, "UTF-8") || !strcasecmp(cc, "utf8"))
|
if (!strcasestr(cc, "UTF-8") || !strcasestr(cc, "utf8"))
|
||||||
Flag(FUTFHACK) = 1;
|
Flag(FUTFHACK) = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user