emacs-devel
[Top][All Lists]
Advanced

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

Re: Fcall_process: wrong conversion


From: Stefan Monnier
Subject: Re: Fcall_process: wrong conversion
Date: Thu, 18 May 2006 13:35:23 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>> `CODING_REQUIRE_ENCODING' test the following things (line 491 to 496,
>> coding.h):

>> /* Return 1 if the coding context CODING requires code conversion on
>> encoding.  */
>> #define CODING_REQUIRE_ENCODING(coding)                              \
>> ((coding)->src_multibyte                                     \
>> || (coding)->common_flags & CODING_REQUIRE_ENCODING_MASK     \
>> || (coding)->mode & CODING_MODE_SELECTIVE_DISPLAY)

> That is to make it possible to do encoding of unibyte string/buffer
> generated by string-as-unibyte or (set-buffer-multibyte nil) from
> multibyte string/buffer.  Perhaps we should not allow such an operation,
> but as this feature is there for long, it seems dangerous to change
> it now.

The problem is that if you allow encoding to be applied to unibyte strings,
then there is no reliable way to represent bytes (as opposed to 8bit chars):
there's always the risk that they'll be encoded.
I'd rather make it clear that a unibyte string contains bytes and not chars.

> How about disabling encoding only for process arguments if
> they are already unibyte?  I think such a change is very
> safe.

Yes, that sounds right.


        Stefan




reply via email to

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