From 0e17387a9e94f2e1974fa857dc8808bbea66c523 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Wed, 9 Jul 2008 13:06:14 +0000 Subject: [PATCH] (detect_coding_utf_8): Set detect_info->found only when non-ASCII char is found. --- src/ChangeLog | 3 +++ src/coding.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 43d0dd3dfb4..a03f3547843 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2008-07-09 Kenichi Handa + * coding.c (detect_coding_utf_8): Set detect_info->found only when + non-ASCII char is found. + * fontset.c (fontset_compare_rfontdef): Fix plus/minus. (reorder_font_vector): Change the arg preferred_family to font. Prefer the spec matching with font. diff --git a/src/coding.c b/src/coding.c index 56dd5d5b803..65754b4b1bb 100644 --- a/src/coding.c +++ b/src/coding.c @@ -1310,7 +1310,8 @@ detect_coding_utf_8 (coding, detect_info) else { detect_info->rejected |= CATEGORY_MASK_UTF_8_SIG; - detect_info->found |= CATEGORY_MASK_UTF_8_NOSIG; + if (found) + detect_info->found |= CATEGORY_MASK_UTF_8_NOSIG; } return 1; } -- 2.39.2