>>>> "Ilpo" == Ilpo Nyyssönen
<iny+news(a)iki.fi> writes:
Ilpo> Loading a file with '-*- coding: utf-8 -*-' in the first
Ilpo> line works OK, characters like ö and ä look OK.
Yup. This will be extended to the second line in 21.4.8 so that
coding cookies don't intefere with shebangs. I could be convinced to
go farther than that for similar formats where you can't reasonably
have a comment in the first or second line.
Ilpo> Loading a file with
Ilpo> Local variables:
Ilpo> mode: text
Ilpo> coding: utf-8
Ilpo> End:
Yup. This has never worked and isn't going to work in 21.4. It's not
a matter of tweaking the local variables code; you have to read the
buffer once raw, recognize the coding system, then re-read the file
with the correct coding system. Very low-level code.
Ilpo> As a workaround: is there a way to convert the buffer to
Ilpo> look right? (other than putting the -*- coding: utf-8 -*-
Ilpo> in the first line, closing it and opening it again)
M-: (decode-coding-system (point-min) (point-max) 'utf-8) RET
You could also try (set-coding-priority-list '(utf-8)) in your init
file, or (set-coding-priority-list '(iso-8-1 utf-8)), to get
autorecognition.
Ilpo> A third thing: xml-mode should notice the coding system from
Ilpo> the encoding-attribute.
Not in 21.4 for the reasons given above. Maybe in a package.
--
Institute of Policy and Planning Sciences
http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
My nostalgia for Icon makes me forget about any of the bad things. I don't
have much nostalgia for Perl, so its faults I remember. Scott Gilbert c.l.py