From: Sebastian Rose <sebastian_rose@gmx.de>
To: Kenichi Handa <handa@m17n.org>
Cc: emacs-devel@gnu.org
Subject: Re: Internal coding system - Need advice 22 v. 23
Date: Wed, 11 Nov 2009 09:10:29 +0100 [thread overview]
Message-ID: <87ljidzdl6.fsf@gmx.de> (raw)
In-Reply-To: <tl7tyx1360p.fsf@m17n.org> (Kenichi Handa's message of "Wed, 11 Nov 2009 15:55:02 +0900")
Kenichi Handa <handa@m17n.org> writes:
> In article <87pr7pzme8.fsf@gmx.de>, Sebastian Rose <sebastian_rose@gmx.de> writes:
>
>> To send unicode text to emacs via org-protocol, I wrote a function, that
>> decodes all those hex-encoded characters (e.g. `%C3%B6' is the German
>> Umlaut `ü'). That function `org-protocol-unhex-string' is defunned in
>> org/lisp/org-protocol.el. It works perfectly for emacs-23.
>
>> For emacs-22 this does _not_ work, however.
>
>> The problem occurs, if `char-to-string' is called with an unicode
>> character. E.g.
>
>> (char-to-string 8211)
>
>> perfectly returns a dash in emacs-23. `org-protocol-unhex-string' works
>> like a charme for texts like those on http://www.welcome2japan.cn/ - in
>> emacs-23.
>
> Emacs-23's character code is a superset of Unicode, but
> Emacs-22's character code is not compatible with Unicode.
> To get Emacs-22's character code from Unicode character
> code, you must use decode-char function. For instance, the
> above should be done by (string (decode-char 'ucs 8211)).
Ahh - OK. Seems to work perfect.
> And please note that Emacs-22 supports just a subset of
> Unicode (U+0000..U+33FF, U+E000..U+FFFF, and some of CJK
> characters contained in such legacy charsets as JISX0208,
> GB2312, KSC5601).
Well, there's nothing I could do about it except check for errors and
fail.
Thanks a lot for this explanation!
Best wishes
Sebastian
prev parent reply other threads:[~2009-11-11 8:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-11 5:00 Internal coding system - Need advice 22 v. 23 Sebastian Rose
2009-11-11 6:55 ` Kenichi Handa
2009-11-11 8:10 ` Sebastian Rose [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ljidzdl6.fsf@gmx.de \
--to=sebastian_rose@gmx.de \
--cc=emacs-devel@gnu.org \
--cc=handa@m17n.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 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).