emacs-devel
[Top][All Lists]
Advanced

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

Re: Fcall_process: wrong conversion


From: Kenichi Handa
Subject: Re: Fcall_process: wrong conversion
Date: Tue, 16 May 2006 13:10:30 +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>, "Herbert Euler" <address@hidden> writes:

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

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

> And there is another problem: if `locale-coding-system' is UTF-16, is
> it correct to add prefix "\377\376" or "\376\377" to every command
> argument?  If not, the current code of `call-process' is wrong, since
> it will always add the prefix.

I think there's no locale that uses utf-16, and it's
impossible to support such a locale because most of basic
libc functions that accept a filename require that it is
terminated by NULL.

---
Kenichi Handa
address@hidden




reply via email to

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