=== modified file 'termkey.c' --- termkey.c 2014-03-05 01:23:16 +0000 +++ termkey.c 2014-01-23 23:57:19 +0000 @@ -6,12 +6,9 @@ #include #include #include -#include #include -#define strcaseeq(a,b) (strcasecmp(a,b) == 0) - void termkey_check_version(int major, int minor) { if(major != TERMKEY_VERSION_MAJOR) { @@ -387,12 +384,8 @@ if(!(flags & (TERMKEY_FLAG_RAW|TERMKEY_FLAG_UTF8))) { char *e; - /* Most OSes will set .UTF-8. Some will set .utf8. Try to be fairly - * generous in parsing these - */ if(((e = getenv("LANG")) || (e = getenv("LC_MESSAGES")) || (e = getenv("LC_ALL"))) && - (e = strchr(e, '.')) && e++ && - (strcaseeq(e, "UTF-8") || strcaseeq(e, "UTF8"))) + (strstr(e, ".UTF-8") || strstr(e, ".utf8"))) flags |= TERMKEY_FLAG_UTF8; else flags |= TERMKEY_FLAG_RAW;