[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: string-as-unibyte

From: Stefan Monnier
Subject: Re: string-as-unibyte
Date: Tue, 19 Jul 2005 10:26:31 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

> 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.

Indeed, but sadly so.  In order to make it clear that the multibyte string
is expected to only contain single-byte chars (including eight-bit-* chars),
a comment is in order.

> Please note that we don't have Fstring_to_unibyte because it
> should work the same way as Fstring_as_unibyte.

Actually no.  string-to-unibyte should signal an error if it encounters
a non-ascii non-eight-bit-* char.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]