emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ^M in the info files


From: Eli Zaretskii
Subject: Re: ^M in the info files
Date: Sat, 10 Jan 2009 14:14:18 +0200

> Date: Sat, 10 Jan 2009 13:15:51 +0200
> From: Eli Zaretskii <address@hidden>
> Cc: address@hidden, address@hidden, address@hidden
> 
> The changes I installed are more thorough than what Juanma posted:
> they change both detect_coding and detect_coding_system, and also bind
> inhibit-null-byte-detection in a couple more places in info.el.

When documenting the new option, I found a strange inconsistency
between detect-coding-region/string and coding detection by
insert-file-contents.  If null bytes are detected, detect_coding sets
up to use no-conversion, but detect-coding-region/string does not call
detect_coding.  Instead, detect-coding-region/string call
detect_coding_system, which does not return no-conversion for a region
or string that include null bytes.  insert-file-contents does use
no-conversion for files that contain null bytes, but it does so
because decode_coding_gap does call detect_coding.

This creates an inconsistency for Lisp programs that do their own
decoding: if they call detect-coding-region/string for a region or
string with null bytes, they will not see no-conversion in the return
value, but insert-file-contents will use no-conversion nonetheless.

I think this inconsistency constitutes a bug.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]