unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#4712: File encoding
@ 2009-10-13  9:12 Elmar Zander
  2009-10-14  9:07 ` Andreas Schwab
  0 siblings, 1 reply; 12+ messages in thread
From: Elmar Zander @ 2009-10-13  9:12 UTC (permalink / raw)
  To: bug-gnu-emacs

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






^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2009-10-17  4:01 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-13  9:12 bug#4712: File encoding Elmar Zander
2009-10-14  9:07 ` 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

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).