[Top][All Lists]

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

Re: environment variable don't get coding conversion

From: Richard Stallman
Subject: Re: environment variable don't get coding conversion
Date: Sun, 26 Jan 2003 21:31:39 -0500

    > "make non-ascii usable" is not specific enough for me to understand.
    > I cannot be sure if there is a real problem.

    I'd say "Make non-ASCII usable" means that the env var should be usable
    in Emacs sub shell. i.e. getenv in program run in subshell will get the
    proper value (usually an 8 bit characters for ISO-8859-x).

That is true, now, in the normal case.  The normal case is that Emacs
inherits the environment variable.  When a subprocess of Emacs inherits it,
Emacs should make sure never to have modified it accidentally.

Are you talking about some different case? If so, could you be

    The `process-environment' can hold the values in multibyte but 
    `child_setup' and `getenv_internal' (in callproc.c) should transform
    the values to unibyte (or whatever necessary for other coding systems
    like CJK and utf-8).

That would make the normal case unreliable.  The cure would be worse
than the disease.

    The way to overcome it in Emacs is to set the env var like this:
      (setenv "HUTST" (encode-coding-string "????" 'hebrew-iso-8bit))

Perhaps the setenv function (and maybe getenv too) should do this
encoding and decoding using locale-coding-system.  Would you like
to give that a try?

reply via email to

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