[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: string-as-unibyte
From: |
Kenichi Handa |
Subject: |
Re: string-as-unibyte |
Date: |
Tue, 19 Jul 2005 11:56:37 +0900 |
User-agent: |
SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/22.0.50 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI) |
In article <address@hidden>, YAMAMOTO Mitsuharu <address@hidden> writes:
>>>>>> On Mon, 18 Jul 2005 17:33:02 -0400, Stefan Monnier <address@hidden>
>>>>>> said:
>> Could you explain the need for the change below:
>> 2005-07-16 YAMAMOTO Mitsuharu <address@hidden>
>> * 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
address@hidden