The following message is a courtesy copy of an article
that has been posted to comp.emacs.xemacs as well.
>>>> "Dmitry" == Dmitry Astapov
<adept(a)umc.com.ua> writes:
Dmitry> Exactly like in info. It turned out that it works only
Dmitry> half-way. While C-x C-f foobar.zzz encoding utf-8 is used
Dmitry> to read file from disk, but buffer-file-coding-system
Dmitry> stays "koi8-r", and problem persists.
I wonder if this has to do with Mule-UCS, or maybe with the koi8-r
coding system. I've not experienced this problem with Japanese.
Dmitry> Is it bug? Is it feature? How can I go about
Dmitry> patching/circumventing it?
It's a design bug and the way to fix it is not obvious, what you're
doing probably works most all of the time; I'll take a more careful look.
Dmitry> I tried to modify code above to pass coding to
Dmitry> insert-file-contents-post-hook hooks and put there hook:
Dmitry> (defun my-set-buffer-file-coding-system (fname visit
Dmitry> coding &optional foo) (setq buffer-file-coding-system
Dmitry> coding))
Dmitry> So far it "Works For Me". Is it the right way to do it?
In this area, if it works for you, that's the best you're going to
get. I'd be careful about backing up my files. Sorry.
--
Institute of Policy and Planning Sciences
http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Ask not how you can "do" free software business;
ask what your business can "do for" free software.