"Stephen J. Turnbull" <stephen(a)xemacs.org> writes:
>>>>> "Simon" == Simon Josefsson
<jas(a)extundo.com> writes:
Simon> Well, I don't think Gnus would tag it as ISO 2022-JP for no
Simon> reason.
Heh. Ask larsi. I think the reason probably was "Content-Type:
application/octet-stream" would drive users into a killing rage. What
alternative does he have? UTF-8 and ISO-8859-X are just as wrong, and
so is omitting the charset parameter (which implies US-ASCII). UTF-8
looks best to me, except that no stable Emacsen supports it out of the
box. But all Mule-capable Emacsen (going back to 18.59) support
ISO-2022-JP-2 (after all, Handa-san wrote that RFC!) as a universal
coding system.
What would you do?
Ideally, I'd want message to discover that the backtrace data that was
pasted into the message buffer is binary data, and then message would
label it as such in a MIME part, perhaps using a Content-Type
application/x-elisp-backtrace. This requires that the backtrace
buffer was originally labeled as binary/noconv by XEmacs, but this
seems to be the correct thing to do anyway. Would this cause problems
somehow? I'm not sure about the implementation though, but it seems
more important to first find out if there is a possible solution to
the problem.
Simon> Perhaps the backtrace buffer is in the default coding
Simon> system, which happen to result in 2022-JP for some users?
Mule doesn't work that way. What matters is the coding system of the
message composition buffer, which is (normally, for Gnus users) under
the control of message-mode. Ie, Gnus. The coding system of the
source buffer is irrelevant.
No matter how you slice it, you get "Gnus done it."
Isn't data recoded when it is copied between buffers? Then Gnus could
hook into that recoding, and save what coding was used before it is
pasted into the message buffer, and use that information during MIME
encoding.
If data is not recoded when it is copied between buffers, then I don't
understand how things could work unless the data itself keep
information about what coding system it is in, but IIRC that is not
how MULE works.
Simon> Perhaps XEmacs should encode backtraces as binary
instead
Simon> of the default text coding system? For me, backtrace
Simon> buffers are ISO8, which I think is equally incorrect.
It's essentially impossible to recognize both noconv and iso8, each
will shadow the other. Having iso8 shadowed makes no sense for most
applications, so it works out that the only way to get the binary
indicator under normal conditions is to explicitly set the coding
system to binary.
Are you talking about autodetection? Isn't it possible, instead, to
add some code that says the backtrace buffers are binary/noconv?
Autodetecting should IMHO be avoided if possible, and for backtraces
we know (I believe) that the data must be preserved as is.