[Top][All Lists]

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

bug#4712: File encoding

From: Stefan Monnier
Subject: bug#4712: File encoding
Date: Wed, 14 Oct 2009 09:27:33 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

>> my source file begins with the following lines
>> #!/usr/bin/perl
>> # -*- coding: iso-8859-1 -*-
>> #
>> I definitely need the latin-1 encoding here because the script is supposed 
>> to do some non-standard translations from latin-1 to html entities. However, 
>> whenever I try to save the file I get the message:
>> Selected encoding mule-utf-8-unix disagrees with iso-8859-1-unix specified 
>> by file contents.  
>> Really save (else edit coding cookies and try again)? (yes or no) 

> That means that the buffer contains characters that cannot be encoded in
> iso-8859-1-unix.

Indeed, but the error message we output is completely unhelpful.
Rather than select utf-8 and then complain that the tag doesn't match,
we should say upfront, that the selected latin-1 can't encode all the
chars in the buffer (and that message can come with the usual thingy
that shows the offending chars and their location).


reply via email to

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