changeset 101197:ee5f395f3c19

(detect_coding_system): Fix handling of null_byte_fount.
author Kenichi Handa <handa@m17n.org>
date Thu, 15 Jan 2009 07:09:26 +0000
parents d0e7051166db
children 0de30bea2375
files src/coding.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/coding.c	Thu Jan 15 03:28:01 2009 +0000
+++ b/src/coding.c	Thu Jan 15 07:09:26 2009 +0000
@@ -7905,10 +7905,11 @@
 	    }
 	}
 
-      if ((detect_info.rejected & CATEGORY_MASK_ANY) == CATEGORY_MASK_ANY)
+      if ((detect_info.rejected & CATEGORY_MASK_ANY) == CATEGORY_MASK_ANY
+	  || null_byte_found)
 	{
 	  detect_info.found = CATEGORY_MASK_RAW_TEXT;
-	  id = coding_categories[coding_category_raw_text].id;
+	  id = CODING_SYSTEM_ID (Qno_conversion);
 	  val = Fcons (make_number (id), Qnil);
 	}
       else if (! detect_info.rejected && ! detect_info.found)