Stephen J. Turnbull wrote:
Glynn> I would guess that undecided-unix would be the right
thing,
Glynn> _if_ it worked consistently.
I don't think it can; it depends on how smart Mule is about making
decisions.
_If_ the HTML file is cat'ted first into a new terminal buffer, I get
Japanese staircase. _If_ I do say `pwd' first, I get mojibake
staircase. With 'undecided-dos as default I get left-justified, same
results.
If it were possible to get Mule to make decisions incrementally, eg
undecided -> (see ^M) undecided-dos (continue several commands) ->
(see ESC $ B) -> ISO-2022-7, it could be pretty reliable. But it
looks like Mule makes its decision on the first command. So it's
going to depend on usage patterns, and if we want users to be happy
we're going to need to come up with some smarter heuristics.
Hmm, it seems to be even less deterministic than that. Today I just
get mojibake regardless of whether I cat ISO2022.jp straight away.
So, I guess the only solution is to have an alist that maps LANG
values to coding systems, and set the coding system according to LANG.
--
Glynn Clements <glynn(a)sensei.co.uk>