X-Git-Url: https://git.llucax.com/software/mutt-debian.git/blobdiff_plain/19304f7c526fbe36ba0db2fb80bcaf3bd974d81d..84b9ea1689a8189d41ea4a821a1fd6cc446b9332:/mbyte.c diff --git a/mbyte.c b/mbyte.c index bb773cf..6e45024 100644 --- a/mbyte.c +++ b/mbyte.c @@ -64,7 +64,7 @@ void mutt_set_charset (char *charset) } #endif - if (!strcmp(buffer, "utf-8")) + if (mutt_is_utf8 (buffer)) Charset_is_utf8 = 1; #ifndef HAVE_WC_FUNCS else if (!ascii_strcasecmp(buffer, "euc-jp") || !ascii_strcasecmp(buffer, "shift_jis") @@ -289,13 +289,15 @@ static int iswupper_ucs (wint_t x) { /* Only works for x < 0x130 */ if ((0x60 < x && x < 0x7b) || (0xe0 <= x && x < 0xff && x != 0xf7)) + return 0; + else if ((0x40 < x && x < 0x5b) || (0xbf < x && x < 0xde)) return 1; else if (0x100 <= x && x < 0x130) return 1; else if (x == 0xb5) return 1; else if (x == 0xff) - return 1; + return 0; else return 0; }