unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [Unicode-2] euro sign disappears
@ 2007-11-16  6:17 Katsumi Yamaoka
  2007-11-16  7:10 ` Kenichi Handa
  2007-11-16 12:41 ` Robert J. Chassell
  0 siblings, 2 replies; 7+ messages in thread
From: Katsumi Yamaoka @ 2007-11-16  6:17 UTC (permalink / raw)
  To: emacs-devel

Hi,

I found strange behaviors of Emacs Unicode-2 when displaying the
euro sign.  After starting Emacs as `LC_ALL=C emacs-23.0.60 -Q',
even if I run `set-language-environment' for the language of some
country belonging to EU, the following Lisp form doesn't display
the euro sign.

(insert (make-char 'latin-iso8859-15 164))

AFAIK, only the Japanese language environment displays it.
Europeans might have to run (set-language-environment 'Japanese)
before setting those native language environment. ;-)

Even in the Japanese language environment, a mail that is encoded
with `iso-2022-jp-2'[1] doesn't show the euro sign in it.  For
example:

(insert (decode-coding-string "\e$(C\"f\e(B" 'iso-2022-jp-2))

I guess the cause of this problem is that the decoded string has
a charset property as follows:

(text-properties-at
 0
 (decode-coding-string "\e$(C\"f\e(B" 'iso-2022-jp-2))
 => (charset korean-ksc5601)

Aren't all concerned with a lack of charsets in
`charset-priority-list'?  Or are they only to me?

In addition, is it right that Emacs uses a wide character for
displaying the euro sign?  (It doesn't look suitable in English
text.)

[1] Gnus uses `iso-2022-jp-2' when encoding a mail containing
    the euro sign because of the default value of
    `mm-coding-system-priorities' that is set in the Japanese
    language environment.

    mm-coding-system-priorities
     => (iso-8859-1 iso-2022-jp iso-2022-jp-2 shift_jis utf-8)

   It might be better to prefer `utf-8' than `iso-2022-jp-2' or
   `shift_jis' nowadays.

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

* Re: [Unicode-2] euro sign disappears
  2007-11-16  6:17 [Unicode-2] euro sign disappears Katsumi Yamaoka
@ 2007-11-16  7:10 ` Kenichi Handa
  2007-11-16  7:27   ` Katsumi Yamaoka
  2007-11-16 12:41 ` Robert J. Chassell
  1 sibling, 1 reply; 7+ messages in thread
From: Kenichi Handa @ 2007-11-16  7:10 UTC (permalink / raw)
  To: Katsumi Yamaoka; +Cc: emacs-devel

In article <b4mmyte1zp1.fsf@jpl.org>, Katsumi Yamaoka <yamaoka@jpl.org> writes:

> I found strange behaviors of Emacs Unicode-2 when displaying the
> euro sign.

Have you checked it by typing C-u C-x = on that euro sign?
I remember that some fonts contain empty glyph for that
character.

---
Kenichi Handa
handa@ni.aist.go.jp

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

* Re: [Unicode-2] euro sign disappears
  2007-11-16  7:10 ` Kenichi Handa
@ 2007-11-16  7:27   ` Katsumi Yamaoka
  2007-11-16 10:24     ` Kenichi Handa
  0 siblings, 1 reply; 7+ messages in thread
From: Katsumi Yamaoka @ 2007-11-16  7:27 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: emacs-devel

>>>>> Kenichi Handa wrote:
> In article <b4mmyte1zp1.fsf@jpl.org>,
>	Katsumi Yamaoka <yamaoka@jpl.org> writes:

>> I found strange behaviors of Emacs Unicode-2 when displaying the
>> euro sign.

> Have you checked it by typing C-u C-x = on that euro sign?
> I remember that some fonts contain empty glyph for that
> character.

Oh, I realized what's wrong.  Thanks.  And sorry for the noise.
`C-u C-x =' told me that Emacs uses a big5 font for the euro sign
in an European language environment.  I don't know why such one
is used but the following workaround solved it.

(set-fontset-font
 "-*-*-*-*-*-*-*-*-*-*-*-*-fontset-default"
 'iso-8859-15
 "-*-*-*-r-*-*-*-*-*-*-*-*-iso8859-15")

For the Japanese lang env, maybe I need to upgrade the ksc5601
font.

Regards,

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

* Re: [Unicode-2] euro sign disappears
  2007-11-16  7:27   ` Katsumi Yamaoka
@ 2007-11-16 10:24     ` Kenichi Handa
  2007-11-16 11:06       ` Katsumi Yamaoka
  2007-11-16 15:39       ` Stefan Monnier
  0 siblings, 2 replies; 7+ messages in thread
From: Kenichi Handa @ 2007-11-16 10:24 UTC (permalink / raw)
  To: Katsumi Yamaoka; +Cc: emacs-devel

In article <b4mmytezm3k.fsf@jpl.org>, Katsumi Yamaoka <yamaoka@jpl.org> writes:

> Oh, I realized what's wrong.  Thanks.  And sorry for the noise.
> `C-u C-x =' told me that Emacs uses a big5 font for the euro sign
> in an European language environment.  I don't know why such one
> is used but the following workaround solved it.

For euro sign, currently these fallback fonts (try M-x
describe-fontset RET RET) are tried in this order by
default.

    -*-*-*-*-*-*-*-*-*-*-*-*-gb2312.1980*
    -*-*-*-*-*-*-*-*-*-*-*-*-gbk-0
    -*-*-*-*-*-*-*-*-*-*-*-*-gb18030*
    -*-*-*-*-*-*-*-*-*-*-*-*-jisx0208*
    -*-*-*-*-*-*-*-*-*-*-*-*-ksc5601.1987*
    -*-*-*-*-*-*-*-*-*-*-*-*-cns11643.1992-1
    -*-*-*-*-*-*-*-*-*-*-*-*-cns11643.1992-2
    -*-*-*-*-*-*-*-*-*-*-*-*-cns11643.1992-3
    -*-*-*-*-*-*-*-*-*-*-*-*-cns11643.1992-4
    -*-*-*-*-*-*-*-*-*-*-*-*-cns11643.1992-5
    -*-*-*-*-*-*-*-*-*-*-*-*-cns11643.1992-6
    -*-*-*-*-*-*-*-*-*-*-*-*-cns11643.1992-7
    -*-*-*-*-*-*-*-*-*-*-*-*-big5*
    -*-*-*-*-*-*-*-*-*-*-*-*-jisx0213.2000-1
    -*-*-*-*-*-*-*-*-*-*-*-*-jisx0213.2004-1
    -*-*-*-*-*-*-*-*-*-*-*-*-jisx0212*
    -*-*-*-*-*-*-*-*-*-*-*-*-iso10646-1
    -gnu-unifont-*-*-*-*-*-*-*-*-*-*-iso10646-1
    -mutt-clearlyu-*-*-*-*-*-*-*-*-*-*-iso10646-1
    -misc-1col-*-*-*-*-*-*-*-*-*-*-iso10646-1

And, in Japanese language environment, the priority for
jisx0213.2001 gets higher than Big5.  But, if a character
has `charset' property, a font corresponding to that charset
register gets the highest priority.

> (set-fontset-font
>  "-*-*-*-*-*-*-*-*-*-*-*-*-fontset-default"
>  'iso-8859-15
>  "-*-*-*-r-*-*-*-*-*-*-*-*-iso8859-15")

I'll add that in fontset.el

> For the Japanese lang env, maybe I need to upgrade the ksc5601
> font.

It may be possible to avoid using a font that has empty
glyph for non-spacing characters.  I'll put that in my todo
list.

---
Kenichi Handa
handa@ni.aist.go.jp

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

* Re: [Unicode-2] euro sign disappears
  2007-11-16 10:24     ` Kenichi Handa
@ 2007-11-16 11:06       ` Katsumi Yamaoka
  2007-11-16 15:39       ` Stefan Monnier
  1 sibling, 0 replies; 7+ messages in thread
From: Katsumi Yamaoka @ 2007-11-16 11:06 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: emacs-devel

>>>>> Kenichi Handa wrote:
> In article <b4mmytezm3k.fsf@jpl.org>,
>	Katsumi Yamaoka <yamaoka@jpl.org> writes:

> For euro sign, currently these fallback fonts (try M-x
> describe-fontset RET RET) are tried in this order by
> default.

>     -*-*-*-*-*-*-*-*-*-*-*-*-gb2312.1980*
>     -*-*-*-*-*-*-*-*-*-*-*-*-gbk-0

[...]

In my case, that's almost equal to yours.

> And, in Japanese language environment, the priority for
> jisx0213.2001 gets higher than Big5.  But, if a character
> has `charset' property, a font corresponding to that charset
> register gets the highest priority.

I see.  FYI, I have no X resouce for Emacs since I'd like to
specify everything in the ~/.emacs file (so, -Q option makes
a true vanilla Emacs in a sense).  Now I have only the following
fontset things for Emacs Unicode-2.

(cond
 ((string-match "\\`6" mule-version)
  (set-fontset-font
   "-*-*-*-*-*-*-*-*-*-*-*-*-fontset-default"
   'japanese-jisx0208
   "-sony-fixed-medium-r-normal-*-16-*-*-*-*-*-jisx0208.1983-0")
  (set-fontset-font
   "-*-*-*-*-*-*-*-*-*-*-*-*-fontset-default"
   'latin-jisx0201
   "-sony-fixed-medium-r-normal-*-16-*-*-*-*-*-jisx0201.1976-0")
  ;; Euro sign.
  (set-fontset-font
   "-*-*-*-*-*-*-*-*-*-*-*-*-fontset-default"
   'latin-iso8859-15
   "-*-*-*-*-*-*-*-*-*-*-*-*-*-*")))

(I don't know why the all-wild font spec for Latin-9 works.)

>> (set-fontset-font
>>  "-*-*-*-*-*-*-*-*-*-*-*-*-fontset-default"
>>  'iso-8859-15
>>  "-*-*-*-r-*-*-*-*-*-*-*-*-iso8859-15")

> I'll add that in fontset.el

>> For the Japanese lang env, maybe I need to upgrade the ksc5601
>> font.

> It may be possible to avoid using a font that has empty
> glyph for non-spacing characters.  I'll put that in my todo
> list.

Thanks.  Have a nice weekend.

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

* Re: [Unicode-2] euro sign disappears
  2007-11-16  6:17 [Unicode-2] euro sign disappears Katsumi Yamaoka
  2007-11-16  7:10 ` Kenichi Handa
@ 2007-11-16 12:41 ` Robert J. Chassell
  1 sibling, 0 replies; 7+ messages in thread
From: Robert J. Chassell @ 2007-11-16 12:41 UTC (permalink / raw)
  To: emacs-devel

Katsumi Yamaoka <yamaoka@jpl.org> said

    I found strange behaviors of Emacs Unicode-2 when displaying the
    euro sign.  ...

    (insert (make-char 'latin-iso8859-15 164))

Weirdly enough, in a non-unicode-2 instance of Emacs

    Today's GNU Emacs CVS snapshot, Fri, 2007 Nov 16  10:51 UTC
    GNU Emacs 23.0.50.5 (i686-pc-linux-gnu, GTK+ Version 2.12.1)
    started with

        emacs -q -D

in the *mail* buffer, I was able to evoke a Euro sign using that
expression after inserting it.  Also, I could see the Euro symbol when
I evoked that expression in a nonce buffer and `C-u C-x ='
(`what-cursor-position' with an argument) said:

      character: € (3876, #o7444, #xf24, U+20AC)
        charset: latin-iso8859-15
                 (Right-Hand Part of Latin Alphabet 9 (ISO/IEC 8859-15):
                  ISO-IR-203.)
     code point: #x24
         syntax: w 	which means: word
       category: l:Latin
    buffer code: #x8E #xA4
      file code: not encodable by coding system iso-latin-1
        display: by this font (glyph code)
         -Adobe-Courier-Medium-R-Normal--18-180-75-75-M-110-ISO8859-15 (#xA4)

However, I put that same expression,
    (insert (make-char 'latin-iso8859-15 164))
in my .emacs file (which was not evaluated), evaluated the Euro sign
expression only, and saw \244.  `C-u C-x =' says

      character: ¤ (164, #o244, #xa4)
        charset: eight-bit-graphic (8-bit graphic char (0xA0..0xFF))
     code point: #xA4
         syntax:   	which means: whitespace
    buffer code: #xA4
      file code: #xA4 (encoded by coding system utf-8)
     display: by this font (glyph code)
         -Adobe-Courier-Medium-R-Normal--17-120-100-100-M-100-ISO8859-1 (#xA4)

-- 
    Robert J. Chassell                          GnuPG Key ID: 004B4AC8
    bob@rattlesnake.com                         bob@gnu.org
    http://www.rattlesnake.com                  http://www.teak.cc

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

* Re: [Unicode-2] euro sign disappears
  2007-11-16 10:24     ` Kenichi Handa
  2007-11-16 11:06       ` Katsumi Yamaoka
@ 2007-11-16 15:39       ` Stefan Monnier
  1 sibling, 0 replies; 7+ messages in thread
From: Stefan Monnier @ 2007-11-16 15:39 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: Katsumi Yamaoka, emacs-devel

> For euro sign, currently these fallback fonts (try M-x
> describe-fontset RET RET) are tried in this order by
> default.

>     -*-*-*-*-*-*-*-*-*-*-*-*-gb2312.1980*
>     -*-*-*-*-*-*-*-*-*-*-*-*-gbk-0
>     -*-*-*-*-*-*-*-*-*-*-*-*-gb18030*
>     -*-*-*-*-*-*-*-*-*-*-*-*-jisx0208*
>     -*-*-*-*-*-*-*-*-*-*-*-*-ksc5601.1987*
>     -*-*-*-*-*-*-*-*-*-*-*-*-cns11643.1992-1
>     -*-*-*-*-*-*-*-*-*-*-*-*-cns11643.1992-2
>     -*-*-*-*-*-*-*-*-*-*-*-*-cns11643.1992-3
>     -*-*-*-*-*-*-*-*-*-*-*-*-cns11643.1992-4
>     -*-*-*-*-*-*-*-*-*-*-*-*-cns11643.1992-5
>     -*-*-*-*-*-*-*-*-*-*-*-*-cns11643.1992-6
>     -*-*-*-*-*-*-*-*-*-*-*-*-cns11643.1992-7
>     -*-*-*-*-*-*-*-*-*-*-*-*-big5*
>     -*-*-*-*-*-*-*-*-*-*-*-*-jisx0213.2000-1
>     -*-*-*-*-*-*-*-*-*-*-*-*-jisx0213.2004-1
>     -*-*-*-*-*-*-*-*-*-*-*-*-jisx0212*
>     -*-*-*-*-*-*-*-*-*-*-*-*-iso10646-1
>     -gnu-unifont-*-*-*-*-*-*-*-*-*-*-iso10646-1
>     -mutt-clearlyu-*-*-*-*-*-*-*-*-*-*-iso10646-1
>     -misc-1col-*-*-*-*-*-*-*-*-*-*-iso10646-1

> And, in Japanese language environment, the priority for
> jisx0213.2001 gets higher than Big5.  But, if a character
> has `charset' property, a font corresponding to that charset
> register gets the highest priority.

In a latin (aka "European") environment, it would probably be preferable
to put the iso10646-1 first in the list.


        Stefan

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

end of thread, other threads:[~2007-11-16 15:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-16  6:17 [Unicode-2] euro sign disappears Katsumi Yamaoka
2007-11-16  7:10 ` Kenichi Handa
2007-11-16  7:27   ` Katsumi Yamaoka
2007-11-16 10:24     ` Kenichi Handa
2007-11-16 11:06       ` Katsumi Yamaoka
2007-11-16 15:39       ` Stefan Monnier
2007-11-16 12:41 ` Robert J. Chassell

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