>>>> "tomo" ==
=?ISO-2022-JP?B?GyRCPGkyLBsoQiAbJEJDTkknGyhC?= / MORIOKA Tomohiko <tomo(a)etl.go.jp>
writes:
>>>> 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.
tomo> Sorry for late answer. From September 16, I went to India and Thai.
tomo> That was interesting travel, but now I'm very tired and I have cold.
tomo> So I don't have enough power to read detail of the patch. However I
tomo> found a trivial problem:
Yes. How about this definition?
/* Valid characters in a coding system name - same as MIME charset name */
#define CODING_SYSTEM_NAME_CHARS \
"ABCDEFGHIJKLMNOPQRSTUVWXYZ" \
"abcdefghijklmnopqrstuvwxyz" \
"0123456789" \
"!#$%&'*+-.^_`{|}~"
tomo> At least, shift_jis should be accepted. I don't know the right
tomo> definition of coding-system-name, but it is a symbol so more
tomo> characters are required. If we decide to accept every names of
tomo> MIME-charset, one criterion is to use MIME syntax. Usually a name of
tomo> MIME-charset should be a <token> of MIME syntax. According to RFC
tomo> 2045,
Since coding system names may be imported in future from MIME
charsets, and since the MIME standard had to solve this same problem
we have, it is reasonable to adopt the MIME charset valid characters
as above.
tomo> token := 1*<any (US-ASCII) CHAR except SPACE, CTLs,
tomo> or tspecials>
tomo> tspecials := "(" / ")" / "<" /
">" / "@" /
tomo> "," / ";" / ":" / "\"
/ <">
tomo> "/" / "[" / "]" / "?"
/ "="
tomo> ; Must be in quoted-string,
tomo> ; to use within parameter values
Perhaps you would like to look at this patch and put it into the
source yourself, when it's been adequately tested (which I have not
yet done).
Martin