emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Usage of standard-display-table in MSDOS


From: Eli Zaretskii
Subject: Re: Usage of standard-display-table in MSDOS
Date: Sun, 29 Aug 2010 07:21:26 -0400

> Date: Sun, 29 Aug 2010 13:16:02 +0300
> From: "Ehud Karni" <address@hidden>
> Cc: address@hidden, address@hidden
> Reply-to: address@hidden
> 
> > ;; For NBSP (U+00A0)
> > (aset standard-display-table #xA0
> >       (vector (unibyte-char-to-multibyte #xA0)))
> 
> This does not work because `unibyte-char-to-multibyte' does not give
> the right result in Emacs-23.1 (it works well on Emacs-21.3).
> Sorry, I did not check on latest Emacs
> 
> I used the following to check it:
> 
> (defun check-multibyte-code (byte)
>        (message "Byte: %02X (%d),  Char: %04X (%d)"
>                 byte byte
>                 (unibyte-char-to-multibyte byte)
>                 (unibyte-char-to-multibyte byte)))
> 
> (check-multibyte-code #xE0)
> 
> 
> The result in 21.3 is correct:
>     Byte: E0 (224),  Char: 0C60 (3168)
> 
> But on 23.1 I get:
>     Byte: E0 (224),  Char: 3FFFE0 (4194272)
> i.e. "literal" #xE0.

The last result is correct 0x3FFFE0 is the internal representation of
0xE0 in Emacs 23.  Emacs 23 and later extends the Unicode code space
with these characters (and some others).

Why did you think it was incorrect?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]