all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Miles Bader <miles.bader@necel.com>
Cc: emacs-pretest-bug@gnu.org, emacs-devel@gnu.org, rms@gnu.org,
	Kenichi Handa <handa@m17n.org>
Subject: Re: GNU Emacs 22.0.50 fails to find ä in different ISO Latin encodings
Date: Fri, 22 Sep 2006 19:31:47 +0900	[thread overview]
Message-ID: <buoac4syyy4.fsf@dhapc248.dev.necel.com> (raw)
In-Reply-To: <453787ED-925B-49B5-A203-3211329FCB13@web.de> (Peter Dyballa's message of "Fri\, 22 Sep 2006 11\:06\:03 +0200")

Peter Dyballa <Peter_Dyballa@web.de> writes:
> 	C-s C-q 245 in ISO 8859-16 does not find ``„´´ (U+201E) – mini- 
> buffer tells me that ``¥´´ (\245 in ISO 8859-1) cannot be found.

That's because the numeric code following C-q is _not_ a unicode code
point, it's an Emacs character code.  In Emacs 22 those two things are
very different (in Emacs 23, I guess they are the same, as Emacs 23 uses
unicode for its internal codes).

You can see the "Emacs character code" of a character by hitting C-x =
on top of that character in a buffer.

E.g., C-x = says that ``„´´ has Emacs code 1234576, and indeed entering
`C-s C-q 1234576 RET' successfully searches for „ !  Similarly, the
Emacs code for ¥ is 4245, and that also works correctly following C-q.

> Which is the formula to map octal 0156772 to a Unicode slot/position?
> Octal 0156772 is DDFA in hex, which is different from 5B57, 字's
> position in Unicode.

(encode-char #o156772 'ucs)
  => 23383 (#o55527, #x5b57)

> Or: how can I find the octal value for a given Unicode slot (U+ABCD)?

(decode-char 'ucs #x5b57)
  => 56826 (#o156772, #xddfa)

[There seems to be no such unicode character #xABCD known to Emacs.]

Note that (decode-char 'ucs CODE) continues to work properly in Emacs
23, even though Emacs internal codes are completely different (in Emacs
23, of course, it basically just returns its 2nd argument), so it seems
a good function to use for code portable between Emacs 22 and 23.

-Miles

-- 
(\(\
(^.^)
(")")
*This is the cute bunny virus, please copy this into your sig so it can spread.

  reply	other threads:[~2006-09-22 10:31 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <F021B5CA-A186-4AFB-B650-520DBB6261C4@Web.DE>
2006-09-19  3:58 ` GNU Emacs 22.0.50 fails to find ä in different ISO Latin encodings Kenichi Handa
2006-09-19  6:43   ` David Kastrup
2006-09-19 22:57   ` Richard Stallman
2006-09-20  7:10     ` Kenichi Handa
2006-09-20  7:43       ` Peter Dyballa
2006-09-20  8:05         ` Kenichi Handa
2006-09-20 11:17           ` Peter Dyballa
2006-09-21  2:13             ` Kenichi Handa
2006-09-21  8:09               ` Peter Dyballa
2006-09-21 23:22               ` Peter Dyballa
2006-09-22  0:44                 ` Miles Bader
2006-09-22  9:06                   ` Peter Dyballa
2006-09-22 10:31                     ` Miles Bader [this message]
2006-09-22 10:55                       ` Peter Dyballa
2006-09-22 11:27                         ` Miles Bader
2006-09-22 22:54                           ` Peter Dyballa
2006-09-22 23:25                             ` Miles Bader
2006-09-23  8:45                               ` Peter Dyballa
2006-09-24  1:51                                 ` Miles Bader
2006-09-23  3:34                           ` Richard Stallman
2006-09-23  5:18                             ` Miles Bader
2006-09-24  2:10                               ` Richard Stallman
2006-09-22  1:06                 ` Kenichi Handa
2006-09-22  9:32                   ` Peter Dyballa
2006-09-21 17:20       ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=buoac4syyy4.fsf@dhapc248.dev.necel.com \
    --to=miles.bader@necel.com \
    --cc=emacs-devel@gnu.org \
    --cc=emacs-pretest-bug@gnu.org \
    --cc=handa@m17n.org \
    --cc=miles@gnu.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.