all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@m17n.org>
Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: string-as-unibyte
Date: Tue, 19 Jul 2005 11:56:37 +0900	[thread overview]
Message-ID: <E1DuiHd-0008RZ-00@etlken> (raw)
In-Reply-To: <wl4qarag9u.wl%mituharu@math.s.chiba-u.ac.jp> (message from YAMAMOTO Mitsuharu on Tue, 19 Jul 2005 07:41:33 +0900)

In article <wl4qarag9u.wl%mituharu@math.s.chiba-u.ac.jp>, YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> writes:

>>>>>>  On Mon, 18 Jul 2005 17:33:02 -0400, Stefan Monnier <monnier@iro.umontreal.ca> said:
>>  Could you explain the need for the change below:

>>  2005-07-16 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>

>>  	* mac.c [TARGET_API_MAC_CARBON] (Fmac_code_convert_string):
>>  Use Fstring_as_unibyte instead of string_make_unibyte.

> It is at the preparation stage of code conversion.  So I think the
> following comment in decode_coding_string (coding.c) is also
> applicable to this case.

>   if (STRING_MULTIBYTE (str))
>     {
>       /* Decoding routines expect the source text to be unibyte.  */
>       str = Fstring_as_unibyte (str);

If a multibyte string is given to mac-code-convert-string,
and the string is made mutlibyte by string-to-multibyte from
the raw-byte sequence (ex. inserting a file by raw-text in a
mutlibyte buffer and extracting a string by
buffer-substring), using Fstring_as_unibyte is correct.
Please note that we don't have Fstring_to_unibyte because it
should work the same way as Fstring_as_unibyte.

---
Kenichi Handa
handa@m17n.org

  parent reply	other threads:[~2005-07-19  2:56 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   ` string-as-unibyte YAMAMOTO Mitsuharu
2005-07-19  2:50     ` string-as-unibyte Kenichi Handa
2005-07-19  2:56   ` Kenichi Handa [this message]
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=E1DuiHd-0008RZ-00@etlken \
    --to=handa@m17n.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.