From: Kenichi Handa Date: Thu, 15 Jan 2009 07:13:39 +0000 (+0000) Subject: (detect_coding_system): Fix handling of null_byte_fount. X-Git-Tag: emacs-pretest-23.0.90~444 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4cddb209b41bea927090ec9c7b0f3a235964586a;p=emacs.git (detect_coding_system): Fix handling of null_byte_fount. --- diff --git a/src/ChangeLog b/src/ChangeLog index dbb34ac3e2d..93aa087f2b9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2009-01-15 Kenichi Handa + + * coding.c (detect_coding_system): Fix handling of + null_byte_found. + 2009-01-14 Jason Rumney * frame.c (x_set_font): Always store a font to the font parameter, diff --git a/src/coding.c b/src/coding.c index 21c59454346..8c7ddf34db2 100644 --- a/src/coding.c +++ b/src/coding.c @@ -7905,10 +7905,11 @@ detect_coding_system (src, src_chars, src_bytes, highest, multibytep, } } - 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)