This proposal sounds great. Please implement if you can.
Yoshiki Hayashi wrote:
"Stephen J. Turnbull" <turnbull(a)sk.tsukuba.ac.jp>
> >>>>> "Ben" == Ben Wing <ben(a)666.com> writes:
> Ben> Moved to xemacs-beta. I disagree. We always want to be
> Ben> automatic when possible -- i.e. option 1. We don't want to
> Ben> burden the user with extra work -- i.e. #3.
> Being automatic is possible only when the user knows what he is
> doing. We need to be very careful that users do not get wedged into
> coding systems they don't know how to get out of. This is one of
> Hrvoje's prime complaints about Mule; it can and does destroy data
> because of coding-system wedging.
Ben's idea is to autodetect every output/input so you won't
end up in strange coding-system. I don't think your last
statement is true since you can always repeat the command
before in shell-mode. What we need is automatic detection
and explicit specification of what coding-system to use.
> Remember, you can't do the equivalent of `C-x C-k RET C-u C-x C-f
> "file" RET "the-right-encoding" RET' on a terminal stream
Now we are discussing how to do that sensibly, aren't we? :-)
> I think we should do something like buffer the first screenful, do
> autodetect on it, and `C-x C-m c' should (optionally?) offer a menu
> including coding systems and a line of sample text from the buffer to
> show the user what they are getting.
This will fail if user accidentally output some amount of
binary data. And we need raw data to autodetect
coding-system. Text in the buffer is already code converted
in most cases. What happens if iso-2022-jp, shift_jis and
euc-jp is outputted in the same buffer?
I think Ben's idea and my idea can coexist. This is a
1. Try to autodetect every input/output by resetting
2. If user specify explicitly what coding-system to use with
C-x RET c, then use that. i.e. reset to that
coding-system instead of auto-detection after every
3. Implement a way to specify coding-system used for only
next command. This will be already existing command
set-buffer-process-coding-system since it will be
reseted after one command execution.
4. (Optional) Implement a way to change coding-system
In order to save my hands, I am cutting back on my responses, especially
to XEmacs-related mail. You _will_ get a response, but please be patient.
If you need an immediate response and it is not apparent in your message,
please say so. Thanks for your understanding.