(detect_coding_utf_8): Set detect_info->found only when
authorKenichi Handa <handa@m17n.org>
Wed, 9 Jul 2008 13:06:14 +0000 (13:06 +0000)
committerKenichi Handa <handa@m17n.org>
Wed, 9 Jul 2008 13:06:14 +0000 (13:06 +0000)
non-ASCII char is found.

src/ChangeLog
src/coding.c

index 43d0dd3..a03f354 100644 (file)
@@ -1,5 +1,8 @@
 2008-07-09  Kenichi Handa  <handa@m17n.org>
 
+       * 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.
index 56dd5d5..65754b4 100644 (file)
@@ -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;
 }