>>>> In <14312.11356.111586.940232(a)lasker.666.com>
>>>> "Martin" = Martin Buchholz <martin(a)xemacs.org> wrote:
Martin> It looks like determine_real_coding_system() should be more
Martin> careful about the characters it accepts after the "coding:"
Martin> cookie.
Martin> Here is a patch, only slightly tested, that should fix the
Martin> problems with determine_real_coding_system(). Moriaka-san,
Martin> can you please, please, review this patch, since you have been
Martin> working on this code? Domo arigato.
Sorry for late answer. From September 16, I went to India and Thai.
That was interesting travel, but now I'm very tired and I have cold.
So I don't have enough power to read detail of the patch. However I
found a trivial problem:
Martin> Michael, perhaps you would like to try this patch?
Martin> Index: file-coding.c
Martin> ===================================================================
Martin> RCS file: /usr/CVSroot/XEmacs/xemacs/src/file-coding.c,v
Martin> retrieving revision 1.7.2.19
Martin> diff -u -r1.7.2.19 file-coding.c
Martin> --- file-coding.c 1999/09/14 06:50:59 1.7.2.19
Martin> +++ file-coding.c 1999/09/22 00:09:31
Martin> @@ -1603,6 +1603,16 @@
Martin> This function does not automatically fetch subsidiary coding systems;
Martin> that should be unnecessary with the explicit eol-type argument. */
Martin> +/* String found in files identifying the encoding of the text in that file */
Martin> +#define CODING_SYSTEM_COOKIE "coding:"
Martin> +
Martin> +/* Valid characters in a coding system name */
Martin> +#define CODING_SYSTEM_NAME_CHARS \
Martin> +"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-"
At least, shift_jis should be accepted. I don't know the right
definition of coding-system-name, but it is a symbol so more
characters are required. If we decide to accept every names of
MIME-charset, one criterion is to use MIME syntax. Usually a name of
MIME-charset should be a <token> of MIME syntax. According to RFC
2045,
token := 1*<any (US-ASCII) CHAR except SPACE, CTLs,
or tspecials>
tspecials := "(" / ")" / "<" / ">" /
"@" /
"," / ";" / ":" / "\" /
<">
"/" / "[" / "]" / "?" /
"="
; Must be in quoted-string,
; to use within parameter values
Best regards,
--
mo.to.