unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* coding system
@ 2003-05-26  9:58 Stein A. Stromme
  2003-05-26 11:05 ` lawrence mitchell
  0 siblings, 1 reply; 17+ messages in thread
From: Stein A. Stromme @ 2003-05-26  9:58 UTC (permalink / raw)



I use iso-latin-1 as my default coding system (Emacs 21.3.50 from CVS.)

If I save the following contents (buffer in text mode) to a file:

    <?xml   ?>    ø

it gets saved just fine, with -1:-- in the mode line.

If I change it to

    <?xml   ?>

I'm able to save it with "nil" (?) encoding, with --:-- in the mode
line (using C-x RET f RET).

Now I change this to 
 
    <?xml "  ?>

and it still saves to --:--  .

Then the puzzle:  if I put back the ø, like this:

    <?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?  

Thanks for your time,
Stein 
-- 
Stein Arild Strømme            +47 55584825, +47 95801887
Universitetet i Bergen                  Fax: +47 55589672     
Matematisk institutt                www.mi.uib.no/stromme         
Johs Brunsg 12, N-5008 BERGEN           stromme@mi.uib.no

^ permalink raw reply	[flat|nested] 17+ messages in thread
* coding system
@ 2005-03-22 12:47 Olive
  2005-03-22 13:57 ` Joe Corneli
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Olive @ 2005-03-22 12:47 UTC (permalink / raw)


I am confused about emacs and coding system. If I evaluate the following 
function

(read-event "Press a key: ")

and press the é key (e acute); I see 2281 in the echo aera. If I want to 
rebind the é key the command which works is

(global-set-key [2281] 'foo)

the command

(global-set-key "é" 'foo)

does not work.

However it seems that the coding system for keyboard input is latin-1. 
This is a unibyte coding system; why does emacs see a multibyte charater 
when I press é? To what corresponds this 2281?

beginnning of the output of (describe-coding-system):

Coding system for saving this buffer:
   Not set locally, use the default.
Default coding system (for new files):
   1 -- iso-latin-1 (alias: iso-8859-1 latin-1)
Coding system for keyboard input:
   1 -- latin-1 (alias of iso-latin-1)
Coding system for terminal output:
   1 -- latin-1 (alias of iso-latin-1)
Defaults for subprocess I/O:
   decoding: 1 -- iso-latin-1 (alias: iso-8859-1 latin-1)
   encoding: 1 -- iso-latin-1 (alias: iso-8859-1 latin-1)

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

end of thread, other threads:[~2005-03-29 14:54 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-26  9:58 coding system Stein A. Stromme
2003-05-26 11:05 ` lawrence mitchell
2003-05-26 11:52   ` Stein A. Stromme
2003-05-26 11:58     ` Stein A. Stromme
2003-05-26 13:47     ` Oliver Scholz
2003-05-26 13:55     ` Kai Großjohann
  -- strict thread matches above, loose matches on Subject: below --
2005-03-22 12:47 Olive
2005-03-22 13:57 ` Joe Corneli
     [not found] ` <mailman.4714.1111501237.32256.help-gnu-emacs@gnu.org>
2005-03-22 14:32   ` Olive
2005-03-23  0:43     ` Miles Bader
2005-03-22 19:08 ` Peter Dyballa
2005-03-26 23:46 ` Stefan Monnier
2005-03-27  6:56   ` B.T. Raven
2005-03-27 10:50     ` Eli Zaretskii
     [not found]     ` <mailman.321.1111924417.28103.help-gnu-emacs@gnu.org>
2005-03-27 15:54       ` Reiner Steib
2005-03-27 20:03         ` B.T. Raven
2005-03-29 14:54     ` Stefan Monnier

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