unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Re: displaying the Eurosign at all
  2002-10-07 23:10 Raimund.Kohl
@ 2002-10-07 21:52 ` ken
  2002-10-07 23:48 ` Raimund.Kohl
  1 sibling, 0 replies; 17+ messages in thread
From: ken @ 2002-10-07 21:52 UTC (permalink / raw)
  Cc: emacs mailing list


C-q 244 SPACE

-- 
AMD crashes?  See http://cleveland.lug.net/~ken/amd-problem/.

Spake Raimund.Kohl@freenet.de at 23:10 (UTC-0000) on Mon, 7 Oct 2002:

= Hi,
= 
= I am following this discussion about the Euro-Sign ... and wonder, how to
= produce an Euro sign within a buffer if I have NO Euro key an my keyboard.
= I am using a US keyboard and running emacs 21.1.1. on SuSE 8.0
= 
= greetings, ray
= 
= 
= 
= _______________________________________________
= Help-gnu-emacs mailing list
= Help-gnu-emacs@gnu.org
= http://mail.gnu.org/mailman/listinfo/help-gnu-emacs
= 

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

* Re: displaying the Eurosign at all
       [not found] <mailman.1034025217.28906.help-gnu-emacs@gnu.org>
@ 2002-10-07 22:45 ` Stefan Monnier <foo@acm.com>
       [not found] ` <m3u1jx2v40.fsf@kuntu.zangpo.org>
  1 sibling, 0 replies; 17+ messages in thread
From: Stefan Monnier <foo@acm.com> @ 2002-10-07 22:45 UTC (permalink / raw)


>>>>> "Raimund" == Raimund Kohl <Raimund.Kohl@freenet.de> writes:
> I am following this discussion about the Euro-Sign ... and wonder, how to
> produce an Euro sign within a buffer if I have NO Euro key an my keyboard.
> I am using a US keyboard and running emacs 21.1.1. on SuSE 8.0

Use one of the input methods that allows a euro sign.
C-u C-\ latin-9-prefix RET selects one of them and `~ e' inserts
then a € char in your buffer.  Or set LANG=de_DE@euro and then
use the Multi_key (which you may have to bind to some key with
xmodmap) and then use Multi_key e = (this should work in all Xwindows
applications, more or less).


        Stefan

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

* displaying the Eurosign at all
@ 2002-10-07 23:10 Raimund.Kohl
  2002-10-07 21:52 ` ken
  2002-10-07 23:48 ` Raimund.Kohl
  0 siblings, 2 replies; 17+ messages in thread
From: Raimund.Kohl @ 2002-10-07 23:10 UTC (permalink / raw)


Hi,

I am following this discussion about the Euro-Sign ... and wonder, how to
produce an Euro sign within a buffer if I have NO Euro key an my keyboard.
I am using a US keyboard and running emacs 21.1.1. on SuSE 8.0

greetings, ray

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

* Re: displaying the Eurosign at all
  2002-10-07 23:10 Raimund.Kohl
  2002-10-07 21:52 ` ken
@ 2002-10-07 23:48 ` Raimund.Kohl
  1 sibling, 0 replies; 17+ messages in thread
From: Raimund.Kohl @ 2002-10-07 23:48 UTC (permalink / raw)


On Mon, 7 Oct 2002 Raimund.Kohl@freenet.de wrote:

> Hi,
>
> I am following this discussion about the Euro-Sign ... and wonder, how to
> produce an Euro sign within a buffer if I have NO Euro key an my keyboard.
> I am using a US keyboard and running emacs 21.1.1. on SuSE 8.0

Oh, Ken already answered my question here - thank you anyway!

ray

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

* Re: displaying the Eurosign at all
       [not found] <mailman.1034027410.506.help-gnu-emacs@gnu.org>
@ 2002-10-08  4:35 ` Miles Bader
  0 siblings, 0 replies; 17+ messages in thread
From: Miles Bader @ 2002-10-08  4:35 UTC (permalink / raw)


Raimund.Kohl@freenet.de writes:
> > I am following this discussion about the Euro-Sign ... and wonder, how to
> > produce an Euro sign within a buffer if I have NO Euro key an my keyboard.
> > I am using a US keyboard and running emacs 21.1.1. on SuSE 8.0
> 
> Oh, Ken already answered my question here - thank you anyway!

Note that you have to have your language environment set up correctly
though (you can do this with `M-x set-language-environment').  In many
LEs, typing `C-q 244 RET' will give you character 164 in latin-1, which
is the `currency sign', not a euro sign (latin-1 doesn't have a euro
sign), and looks quite different.

[I can get `C-q 244 RET' to produce a euro-sign if my language
environment is set to `latin-9', but most other language environment
seem to give me the currency sign.]

-Miles
-- 
`Life is a boundless sea of bitterness'

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

* Re: displaying the Eurosign at all
       [not found] ` <m3u1jx2v40.fsf@kuntu.zangpo.org>
@ 2002-10-08  9:36   ` Klaus Berndl
  2005-03-07 13:49     ` Josef Dalcolmo
       [not found]     ` <mailman.2882.1110206200.32256.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 17+ messages in thread
From: Klaus Berndl @ 2002-10-08  9:36 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 714 bytes --]

On Tue, 08 Oct 2002, Martin Schmitz wrote:



>  Raimund.Kohl@freenet.de writes:
>  
> > I am following this discussion about the Euro-Sign ... and wonder, how to
> > produce an Euro sign within a buffer if I have NO Euro key an my keyboard.
> > I am using a US keyboard and running emacs 21.1.1. on SuSE 8.0
>  
>  (defun insert-euro ()
>    "insert the euro sign"
>    (interactive "*")
>    (insert (string (make-char 'latin-iso8859-15 164))))
>  
>  (global-set-key "your favorite key-sequence" 'insert-euro)

Yes, this does the job, great. Now i can insert the €.
Windows users could do

(global-set-key (kbd "\200") 'insert-euro)

to get the € at the same key like in other Windows-programs.

Thanks,
Klaus


[-- Attachment #2: Type: text/plain, Size: 183 bytes --]


-- 
Klaus Berndl			mailto: klaus.berndl@sdm.de
sd&m AG				http://www.sdm.de
software design & management
Thomas-Dehler-Str. 27, 81737 München, Germany
Tel +49 89 63812-392, Fax -220

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

* Re: displaying the Eurosign at all
  2002-10-08  9:36   ` Klaus Berndl
@ 2005-03-07 13:49     ` Josef Dalcolmo
       [not found]     ` <mailman.2882.1110206200.32256.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 17+ messages in thread
From: Josef Dalcolmo @ 2005-03-07 13:49 UTC (permalink / raw)



I still have problems with the EURO sign:

At 08 Oct 2002 11:36:48 +0200,
Klaus Berndl wrote:
...
> (global-set-key (kbd "\200") 'insert-euro)

This works, e.g. I see a Euro sign in the current buffer. However
there is no Euro sign character (latin-9) in the file, even though my
default language environment is set to Latin-9.

When I insert a EURO character with another editor (for example
SciTE) into a file, then Emacs still shows it as \200.

So, something is still wrong, but what?

- Josef

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

* Re: displaying the Eurosign at all
       [not found]     ` <mailman.2882.1110206200.32256.help-gnu-emacs@gnu.org>
@ 2005-03-07 14:58       ` Stefan Monnier
  2005-03-07 15:44         ` Josef Dalcolmo
       [not found]         ` <mailman.2905.1110213034.32256.help-gnu-emacs@gnu.org>
  2005-03-07 15:28       ` Pascal Bourguignon
  1 sibling, 2 replies; 17+ messages in thread
From: Stefan Monnier @ 2005-03-07 14:58 UTC (permalink / raw)


> Klaus Berndl wrote:
> ...
>> (global-set-key (kbd "\200") 'insert-euro)

To bind a command to the euro key, I'd recommend something like:

  (global-set-key "€" 'insert-euro)

Also instead of `insert-euro' I'd just use:

  (global-set-key "€" 'self-insert-command)

But since "€" is already bound to self-insert-command by default, I'd
recommend you don't change anything at all.

BTW 128 (aka \200) is not the latin-9 encoding of the euro sign (it's 164,
aka \244), AFAIK, so the problem is most likely that you haven't correctly
described the coding-system used by your keyboard, which doesn't seem to be
latin-9.


        Stefan

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

* Re: displaying the Eurosign at all
       [not found]     ` <mailman.2882.1110206200.32256.help-gnu-emacs@gnu.org>
  2005-03-07 14:58       ` Stefan Monnier
@ 2005-03-07 15:28       ` Pascal Bourguignon
  1 sibling, 0 replies; 17+ messages in thread
From: Pascal Bourguignon @ 2005-03-07 15:28 UTC (permalink / raw)


Josef Dalcolmo <dalcolmo@vh-s.de> writes:

> I still have problems with the EURO sign:
> 
> At 08 Oct 2002 11:36:48 +0200,
> Klaus Berndl wrote:
> ...
> > (global-set-key (kbd "\200") 'insert-euro)
> 
> This works, e.g. I see a Euro sign in the current buffer. However
> there is no Euro sign character (latin-9) in the file, even though my
> default language environment is set to Latin-9.
> 
> When I insert a EURO character with another editor (for example
> SciTE) into a file, then Emacs still shows it as \200.
> 
> So, something is still wrong, but what?

Here is what I have in my ~/.emacs:

(when (fboundp 'unify-8859-on-encoding-mode)
  (unify-8859-on-encoding-mode 1))
(when (fboundp 'unify-8859-on-decoding-mode)
  (unify-8859-on-decoding-mode 1))

(setq default-enable-multibyte-characters      t
      unibyte-display-via-language-environment nil)

;; If we got Latin-9 take it:
(setq my-latin (if (assoc-ignore-case "Latin-9" language-info-alist) 9 1))
;; For coding-system we don't specify *-unix to allow it to load DOS files.
(cond
 ((= my-latin 1) (setq my-lenv     "Latin-1"
                       my-encoding 'iso-8859-1))
 ((= my-latin 9) (setq my-lenv     "Latin-9"
                       my-encoding 'iso-8859-15))
 (t (error "Invalid value for my-latin variable.")))

(set-language-environment my-lenv)
(prefer-coding-system my-encoding)


Then I type in € with C-x 8 $ 
and it shows like an euro, and when I load files containing \200, 
they are interpreted as Latin-9 (iso-8859-15) files and these
characters show as euros.

Of course, it helps to have X fonts with iso-8859-15 characters too.

-- 
__Pascal_Bourguignon__               _  Software patents are endangering
()  ASCII ribbon against html email (o_ the computer industry all around
/\  1962:DO20I=1.100                //\ the world http://lpf.ai.mit.edu/
    2001:my($f)=`fortune`;          V_/   http://petition.eurolinux.org/

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

* Re: displaying the Eurosign at all
  2005-03-07 14:58       ` Stefan Monnier
@ 2005-03-07 15:44         ` Josef Dalcolmo
       [not found]         ` <mailman.2905.1110213034.32256.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 17+ messages in thread
From: Josef Dalcolmo @ 2005-03-07 15:44 UTC (permalink / raw)



Dear Stefan,

> BTW 128 (aka \200) is not the latin-9 encoding of the euro sign (it's 164,
> aka \244), AFAIK, so the problem is most likely that you haven't correctly
> described the coding-system used by your keyboard, which doesn't seem to be
> latin-9.

my keyboard coding-system was set to nil (I use a US keyboard) but
that is not the problem I've encountered. The real culprit is once
again Micro$oft. They are using a modified version of the Latin-1
characterset (WinLatin-1, or whatever one can call it, and that is
what I've been using without knowing for a while now. Using winlatin-1
the Euro sign is on \200. That works fine on e-mail between Windows
systems. I am not sure how to solve the problem in general. I would
expect if I insert \244 in my email, using ordinary Windoze
applications will see some wierd character, but not a EURO sign.

- Josef

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

* Re: displaying the Eurosign at all
       [not found]         ` <mailman.2905.1110213034.32256.help-gnu-emacs@gnu.org>
@ 2005-03-07 16:34           ` Pascal Bourguignon
  2005-03-09  4:59           ` Stefan Monnier
  1 sibling, 0 replies; 17+ messages in thread
From: Pascal Bourguignon @ 2005-03-07 16:34 UTC (permalink / raw)


Josef Dalcolmo <dalcolmo@vh-s.de> writes:

> Dear Stefan,
> 
> > BTW 128 (aka \200) is not the latin-9 encoding of the euro sign (it's 164,
> > aka \244), AFAIK, so the problem is most likely that you haven't correctly
> > described the coding-system used by your keyboard, which doesn't seem to be
> > latin-9.
> 
> my keyboard coding-system was set to nil (I use a US keyboard) but
> that is not the problem I've encountered. The real culprit is once
> again Micro$oft. They are using a modified version of the Latin-1
> characterset (WinLatin-1, or whatever one can call it, and that is
> what I've been using without knowing for a while now. Using winlatin-1
> the Euro sign is on \200. That works fine on e-mail between Windows
> systems. I am not sure how to solve the problem in general. I would
> expect if I insert \244 in my email, using ordinary Windoze
> applications will see some wierd character, but not a EURO sign.

Perhaps emacs on MS-Windows can identify the special keyboard encoding
used there.  Otherwise, 

 (global-set-key (kbd "\200") (lambda (n) (dotimes (i n) (insert "€"))))

should do.


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS d? s++:++ a+ C+++ UL++++ P--- L+++ E+++ W++ N+++ o-- K- w--- 
O- M++ V PS PE++ Y++ PGP t+ 5+ X++ R !tv b+++ DI++++ D++ 
G e+++ h+ r-- z? 
------END GEEK CODE BLOCK------

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

* Re: displaying the Eurosign at all
       [not found]         ` <mailman.2905.1110213034.32256.help-gnu-emacs@gnu.org>
  2005-03-07 16:34           ` Pascal Bourguignon
@ 2005-03-09  4:59           ` Stefan Monnier
  2005-03-09  8:34             ` Peter Dyballa
       [not found]             ` <mailman.3091.1110358306.32256.help-gnu-emacs@gnu.org>
  1 sibling, 2 replies; 17+ messages in thread
From: Stefan Monnier @ 2005-03-09  4:59 UTC (permalink / raw)


> characterset (WinLatin-1, or whatever one can call it, and that is
> what I've been using without knowing for a while now.  Using winlatin-1
> the Euro sign is on \200.

So why do you try to use latin-9?  Just use "winlatin-1" (IIRC it's
actually called windows-1252 or some such).


        Stefan

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

* Re: displaying the Eurosign at all
  2005-03-09  4:59           ` Stefan Monnier
@ 2005-03-09  8:34             ` Peter Dyballa
       [not found]             ` <mailman.3091.1110358306.32256.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 17+ messages in thread
From: Peter Dyballa @ 2005-03-09  8:34 UTC (permalink / raw)
  Cc: help-gnu-emacs


Am 09.03.2005 um 05:59 schrieb Stefan Monnier:

> So why do you try to use latin-9?  Just use "winlatin-1" (IIRC it's
> actually called windows-1252 or some such).

Latin-9 or ISO 8859-15 has €. ISO 8859-1 and the others do not.

--
Greetings

   Pete

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

* Re: displaying the Eurosign at all
       [not found]             ` <mailman.3091.1110358306.32256.help-gnu-emacs@gnu.org>
@ 2005-03-09 10:27               ` Oliver Scholz
  2005-03-09 15:11               ` Josef Dalcolmo
  1 sibling, 0 replies; 17+ messages in thread
From: Oliver Scholz @ 2005-03-09 10:27 UTC (permalink / raw)


Peter Dyballa <Peter_Dyballa@Web.DE> writes:

> Am 09.03.2005 um 05:59 schrieb Stefan Monnier:
>
>> So why do you try to use latin-9?  Just use "winlatin-1" (IIRC it's
>> actually called windows-1252 or some such).
>
> Latin-9 or ISO 8859-15 has €. ISO 8859-1 and the others do not.

I think it has already been mentioned: windows-1252 has the € at
position #x80.

This message should go out encoded in windows-1252.

    Oliver
-- 
19 Ventôse an 213 de la Révolution
Liberté, Egalité, Fraternité!

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

* Re: displaying the Eurosign at all
       [not found]             ` <mailman.3091.1110358306.32256.help-gnu-emacs@gnu.org>
  2005-03-09 10:27               ` Oliver Scholz
@ 2005-03-09 15:11               ` Josef Dalcolmo
  2005-03-09 15:23                 ` Oliver Scholz
  2005-03-09 15:27                 ` Stefan Monnier
  1 sibling, 2 replies; 17+ messages in thread
From: Josef Dalcolmo @ 2005-03-09 15:11 UTC (permalink / raw)



Well, it's not quite that simple - at least not with my NTemacs
version 21.3.50.1

There is no language environment called windows-1252 (though
windows-1255 exists). 

The default terminal and keyboard encoding is indeed cp1252, which
explains why I wasn't having problems with typing and displaying EURO
signs. 

However, when default file I/O is coded in C to be 
default-buffer-file-coding-system = 'iso-latin-1-dos'

Setting this variable to cp1252 did not do the trick either.  I had to
set file-coding-system-alist (I added an entry for .txt to be mapped
to cp1252, and now I can see the EURO sign instead of the \200 when
opening a text file generated under Windows2000 by another
application.)

Modifying (file-coding-system-alist) wasn't trivial, because configure
shows two of the entries to be mapped to functions erroneously as
strings. If I just add something to the list and save it, I get an
error. I guess this is a bug.

I think the default coding system for file I/O under Windows
should be cp1252 (aka windows-1252) or cp1252-dos, not
iso-latin-1-dos. Even better, Emacs should be able to determine the
locally used default encoding and use that as the default (which
varies by localization of the OS).

- Josef

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

* Re: displaying the Eurosign at all
  2005-03-09 15:11               ` Josef Dalcolmo
@ 2005-03-09 15:23                 ` Oliver Scholz
  2005-03-09 15:27                 ` Stefan Monnier
  1 sibling, 0 replies; 17+ messages in thread
From: Oliver Scholz @ 2005-03-09 15:23 UTC (permalink / raw)


Josef Dalcolmo <dalcolmo@vh-s.de> writes:

> Well, it's not quite that simple - at least not with my NTemacs
> version 21.3.50.1
>
> There is no language environment called windows-1252 (though
> windows-1255 exists). 

Since you are using a CVS version, update it to the latest. Or if you
can't: use (require 'code-pages)

> I think the default coding system for file I/O under Windows
> should be cp1252 (aka windows-1252) or cp1252-dos, not
> iso-latin-1-dos. Even better, Emacs should be able to determine the
> locally used default encoding and use that as the default (which
> varies by localization of the OS).

Emacs uses the locale environment to determine the default coding
system. (Other than that it should IMO default to UTF-8 and not to
whatever Western (!) European users might prefer if they don't prefer
UTF-8.)

    Oliver
-- 
19 Ventôse an 213 de la Révolution
Liberté, Egalité, Fraternité!

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

* Re: displaying the Eurosign at all
  2005-03-09 15:11               ` Josef Dalcolmo
  2005-03-09 15:23                 ` Oliver Scholz
@ 2005-03-09 15:27                 ` Stefan Monnier
  1 sibling, 0 replies; 17+ messages in thread
From: Stefan Monnier @ 2005-03-09 15:27 UTC (permalink / raw)


> Well, it's not quite that simple - at least not with my NTemacs
> version 21.3.50.1

Since this is about a development version of Emacs, we should move
this elsewhere.  See INSTALL.CVS.

> There is no language environment called windows-1252 (though
> windows-1255 exists).

Indeed, window-1252 is not a language (I know, there's a "Latin-1" language
environment, but it was just a mistake).  I meant "the cp1252 coding system"
which is also sometimes called "windows-1252".

> The default terminal and keyboard encoding is indeed cp1252, which
> explains why I wasn't having problems with typing and displaying EURO
> signs.

Good.  But in that case, you shouldn't need the global-set-key binding to
insert a euro.

> However, when default file I/O is coded in C to be 
> default-buffer-file-coding-system = 'iso-latin-1-dos'

Assuming all this is with "emacs -q", it sounds like a bug.  Please report
it with M-x report-emacs-bug.

> Setting this variable to cp1252 did not do the trick either.

Sounds very odd.  What exactly did you do?  What does
C-h v buffer-file-coding-system say after you load a file with a \200 euro?

> I think the default coding system for file I/O under Windows should be
> cp1252 (aka windows-1252) or cp1252-dos, not iso-latin-1-dos.
> Even better, Emacs should be able to determine the locally used default
> encoding and use that as the default (which varies by localization of the
> OS).

As far as I know that's what it does already.
But I don't actually write or use the Windows part of the Emacs code, so
I may be wrong.


        Stefan

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

end of thread, other threads:[~2005-03-09 15:27 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.1034025217.28906.help-gnu-emacs@gnu.org>
2002-10-07 22:45 ` displaying the Eurosign at all Stefan Monnier <foo@acm.com>
     [not found] ` <m3u1jx2v40.fsf@kuntu.zangpo.org>
2002-10-08  9:36   ` Klaus Berndl
2005-03-07 13:49     ` Josef Dalcolmo
     [not found]     ` <mailman.2882.1110206200.32256.help-gnu-emacs@gnu.org>
2005-03-07 14:58       ` Stefan Monnier
2005-03-07 15:44         ` Josef Dalcolmo
     [not found]         ` <mailman.2905.1110213034.32256.help-gnu-emacs@gnu.org>
2005-03-07 16:34           ` Pascal Bourguignon
2005-03-09  4:59           ` Stefan Monnier
2005-03-09  8:34             ` Peter Dyballa
     [not found]             ` <mailman.3091.1110358306.32256.help-gnu-emacs@gnu.org>
2005-03-09 10:27               ` Oliver Scholz
2005-03-09 15:11               ` Josef Dalcolmo
2005-03-09 15:23                 ` Oliver Scholz
2005-03-09 15:27                 ` Stefan Monnier
2005-03-07 15:28       ` Pascal Bourguignon
2002-10-07 23:10 Raimund.Kohl
2002-10-07 21:52 ` ken
2002-10-07 23:48 ` Raimund.Kohl
     [not found] <mailman.1034027410.506.help-gnu-emacs@gnu.org>
2002-10-08  4:35 ` Miles Bader

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