[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs refusing to switch to iso-latin-1

From: David Kastrup
Subject: Re: Emacs refusing to switch to iso-latin-1
Date: Tue, 12 Feb 2008 20:27:00 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Sébastien Vauban <address@hidden> writes:

> Hi,
>>>> BTW, here's a sample file (let's call it `test.xml') that
>>>> exhibits the described problem:
>>>>     <enumType name="test">
>>>>       <pair value="0">- Sélectionner -</pair>
>>>>       <pair value="11">Dû à l'entreprise</pair>
>>>>       <pair value="12">Stagiaire occupé</pair>
>>>>       <pair value="13">Autres</pair>
>>>>     </enumType>
>>>> Thanks for your help!
>>> Huh? That file does not contain an encoding header, and so
>>> according to the XML standard, it _has_ to be encoded in
>>> utf-8. Emacs gets this right.
> I did not know about that.
> But, for me, this does not explain why my request to "use
> iso-latin-1-unix for saving this buffer" is not respected.

Because your file does not start with
<?xml version="1.0" encoding="ISO-8859-1"?>

Is that so hard to understand?

XML without such a header is encoded in utf-8, period.  Any conforming
XML interpreter will _barf_ if you were able to save in latin-1.

David Kastrup, Kriemhildstr. 15, 44793 Bochum

reply via email to

[Prev in Thread] Current Thread [Next in Thread]