>>>> "Matej" == Matej Mihelic
<matej(a)neosys.xrs.si> writes:
Matej> - I have not found a way to setup the coding systems to
Matej> work transparently using "default" coding systems.
SJT> There's no good way for Cyrillic, [...]
Matej> Windows codepage 1250 is East-European codepage - a
Matej> modified ISO 8859-2.
Sorry, I knew that. I just forgot. :-/
Matej> In my tests I was trying to setup XEmacs to read and write
Matej> CP1250 "DOS" encoding by default and to use any other
Matej> encoding (ISO-8859-2 and/or Unicode) on request.
Matej> - As soon as I specify "buffer-file-coding-system-for-read"
Matej> the DOS EOL detection stops working on a simple text files.
Pass to Ben on that one.
Matej> - I was trying to setup coding systems using
Matej> "prefer-coding-system" which failed.
OK, in the standard distribution (eg, 21.4.x) you need to add a Lisp
file[1] implementing the 1250 coding system as 'windows-1250, do
(set-coding-category-system 'iso-8-1 'windows-1250)
(prefer-coding-system 'windows-1250)
The problem is that Mule cannot detect coding systems, only categories
of coding systems (eg, it requires a very smart code to distinguish
ISO-8859-2 from ISO-8859-1). So what prefer-coding-system actually
does is to prefer the _coding category_ associated with 'windows-1250,
which is ISO-8-1. But the coding system associated with that by
default is 'ctext (an alias for ISO-8859-1), and in the Slovenian
language environment that presumably is set to ISO-8859-2.
So the effect of `prefer-coding-system' by itself should be to give
you the default detection as the initial Slovenian language
environment, ISO-8859-2. That's what you see, right? Does
(set-coding-category-system 'iso-8-1 'mswindows-multibyte)
succeed (== not generate an error)? Does it give the right behavior
when combined with (prefer-coding-system 'mswindows-multibyte)?
I don't understand the "Windows locale".[2] But the idea of asking
Windows what the locale is is effectively what happens on Unix
systems, where set-language-environment can query the POSIX locale.
So it's not clear that the implementation needs to change, although
the UI and the predefined language environments clearly need
improvement.
Footnotes:
[1] This is my bug; Hrvoje Niksic contributed one long ago and it
seems to have gotten lost.
[2] All I ever see of it is completely nonsensical behavior from
poorly configured Windows MUAs and MTAs. :-(
--
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences Tel/fax: +81 (298) 53-5091
_________________ _________________ _________________ _________________
What are those straight lines for? "XEmacs rules."