From: Elmar Zander <ezander@valkyrie.sc.cs.tu-bs.de>
To: bug-gnu-emacs@gnu.org
Subject: bug#4712: File encoding
Date: Tue, 13 Oct 2009 11:12:51 +0200 [thread overview]
Message-ID: <E1MxdR5-0002Ra-7C@valkyrie.sc.cs.tu-bs.de> (raw)
Hi!
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)
It doesn't help setting the buffer-file-coding system, like
M-x set-buffer-file-coding-system latin-1
I get then
buffer-file-coding-system is a variable defined in `C source code'.
Its value is latin-1-unix
Local in buffer html_translate; global value is mule-utf-8
but after saving (ignoring the warning) again:
buffer-file-coding-system is a variable defined in `C source code'.
Its value is mule-utf-8-unix
Hmm, so it completely ignores my settings. It would be nice if emacs either
at least gave me the choice between latin-1 and utf-8 (instead of just
yes or no) or tell me how the hell to "edit the coding cookies" (I have
no clue what that is and also extensive internet search and manual reading
didn't turn that up).
Regards,
Elmar
In GNU Emacs 22.3.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2009-03-31 on raven, modified by Debian
configured using `configure '--build=i486-linux-gnu' '--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs22:/etc/emacs:/usr/local/share/emacs/22.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/22.3/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/22.3/leim' '--with-x=yes' '--with-x-toolkit=athena' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS=''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_AU.UTF-8
locale-coding-system: utf-8
default-enable-multibyte-characters: t
Major mode: Perl
Minor modes in effect:
encoded-kbd-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
unify-8859-on-encoding-mode: t
utf-translate-cjk-mode: t
auto-compression-mode: t
line-number-mode: t
Recent input:
A ESC O A ESC O A ESC O A ESC O A ESC O A ESC O A ESC
O A ESC O A ESC O A ESC O A ESC O A ESC O A ESC O A
ESC O A ESC O A ESC O A ESC O A ESC O A ESC O A ESC
O A ESC O A ESC O A ESC O A ESC O A ESC O A ESC O A
ESC O A ESC O B ESC O B ESC O B ESC O B ESC O B ESC
O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B
ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC
O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B
ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC
O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B
ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC
O B ESC O B ESC O H ESC [ 5 ~ ESC [ 5 ~ ESC [ 5 ~ ESC
[ 5 ~ ESC O A ESC O A ESC O A ESC O A ESC O A ESC O
A ESC O A ESC O A ESC O A ESC O A C-x C-s C-g C-x C-s
y e s RET C-z ESC O B ESC O A SPC DEL C-x C-s C-g ESC
x r e p o TAB r TAB RET
Recent messages:
Quit
Making completion list...
Type C-x 4 C-o RET to restore the other window.
call-interactively: Beginning of buffer [2 times]
Quit
Wrote /globalfs/VALKYRIEHOME/ezander/institut/www/html/wir_htmllib/html_translate
Quit
Auto-saving...
Making completion list...
Loading emacsbug...done
next reply other threads:[~2009-10-13 9:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-13 9:12 Elmar Zander [this message]
2009-10-14 9:07 ` bug#4712: File encoding Andreas Schwab
2009-10-14 13:27 ` Stefan Monnier
2009-10-14 14:04 ` Eli Zaretskii
2009-10-14 14:33 ` Andreas Schwab
2009-10-14 18:11 ` Eli Zaretskii
2009-10-14 15:19 ` Stefan Monnier
2009-10-14 18:15 ` Eli Zaretskii
2009-10-15 3:16 ` Stefan Monnier
2009-10-15 7:20 ` Eli Zaretskii
2009-10-15 9:38 ` Andreas Schwab
2009-10-17 4:01 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1MxdR5-0002Ra-7C@valkyrie.sc.cs.tu-bs.de \
--to=ezander@valkyrie.sc.cs.tu-bs.de \
--cc=4712@emacsbugs.donarmstrong.com \
--cc=bug-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).