From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Cc: emacs-devel@gnu.org
Subject: Re: string-as-unibyte
Date: Tue, 19 Jul 2005 08:52:02 +0900 [thread overview]
Message-ID: <wl3bqbisf1.wl%mituharu@math.s.chiba-u.ac.jp> (raw)
In-Reply-To: <wl4qarag9u.wl%mituharu@math.s.chiba-u.ac.jp>
>>>>> On Tue, 19 Jul 2005 07:41:33 +0900, YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> said:
> I was trying to make a coding system that almost works as utf-8, but
> additionally does "HFS+ composition" (canonical composition with
> some exclusions) on decoding.
> (when str
> (erase-buffer)
> (insert (if enable-multibyte-characters
> (string-as-multibyte str) str)))
Maybe this part should have been string-to-multibyte.
BTW, I noticed that backslashes in the docstring of
string-as-multibyte are stripped off as follows:
If you're not sure, whether to use `string-as-multibyte' or
`string-to-multibyte', use `string-to-multibyte'. Beware:
(aref (string-as-multibyte "201") 0) -> 129 (aka ?201)
(aref (string-as-multibyte "300") 0) -> 192 (aka ?300)
(aref (string-as-multibyte "300201") 0) -> 192 (aka ?300)
(aref (string-as-multibyte "300201") 1) -> 129 (aka ?201)
but
(aref (string-as-multibyte "201300") 0) -> 2240
(aref (string-as-multibyte "201300") 1) -> <error>
YAMAMOTO Mitsuharu
mituharu@math.s.chiba-u.ac.jp
next prev parent reply other threads:[~2005-07-18 23:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-18 21:33 string-as-unibyte Stefan Monnier
2005-07-18 22:41 ` string-as-unibyte YAMAMOTO Mitsuharu
2005-07-18 23:52 ` YAMAMOTO Mitsuharu [this message]
2005-07-19 2:50 ` string-as-unibyte Kenichi Handa
2005-07-19 2:56 ` string-as-unibyte Kenichi Handa
2005-07-19 3:49 ` string-as-unibyte YAMAMOTO Mitsuharu
2005-07-19 14:26 ` string-as-unibyte Stefan Monnier
2005-07-20 0:36 ` string-as-unibyte Kenichi Handa
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=wl3bqbisf1.wl%mituharu@math.s.chiba-u.ac.jp \
--to=mituharu@math.s.chiba-u.ac.jp \
--cc=emacs-devel@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.