help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: coding system


From: lawrence mitchell
Subject: Re: coding system
Date: Mon, 26 May 2003 12:05:26 +0100
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50

Stein A. Stromme wrote:

[...]

>     <?xml "  ?>

>     Selected encoding iso-latin-1 disagrees with utf-8 specified by
>     file contents.  Really save (else edit coding cookies and try
>     again)? (y or n)

> I answer y and the file gets saved with -1:-- , which is fine, but I
> get this question each time the file gets modified and needs saving
> again.

> What is going on here?

Emacs thinks the buffer is an XML file.  The XML spec states
that any XML document which does not explicitly specify its
coding system in its opening line.   e.g.
<?xml version="1.0" encoding="iso-8859-1" ?> for latin-1 should
be taken to be encoded as UTF-8.  As such, Emacs tries to do the
right thing, and ensure that the document is saved as UTF-8.

To avoid the questioning regarding the coding-system, either,
specify the coding-system in the <?xml ?> declaration, or save
the file as UTF-8.

-- 
lawrence mitchell <wence@gmx.li>


reply via email to

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