[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#6115: 64 bit windows environment variables
From: |
Martin Maechler |
Subject: |
bug#6115: 64 bit windows environment variables |
Date: |
Mon, 10 May 2010 13:43:22 +0200 |
>>>>> "SM" == Stefan Monnier <monnier@iro.umontreal.ca>
>>>>> on Thu, 06 May 2010 09:16:28 -0400 writes:
>>> From the MS Windows 64 bit CMD window I get
>> c:\>echo %ProgramFiles(x86)%
>> C:\Program Files (x86)
>> c:\>echo %ProgramFiles%
>> C:\Program Files
SM> [...]
>> GNU Emacs 23.1.97.1 (i386-mingw-nt6.1.7600) of 2010-05-04 on G41R2F1
>> I get
>> (getenv "ProgramFiles(x86)")
>> "C:\\Program Files (x86)"
>> (getenv "ProgramFiles")
>> "C:\\Program Files (x86)"
SM> [...]
>> In Emacs, both the "ProgramFiles*" environment variables give the same
>> result. I don't think that should be correct behavior.
SM> I know close to nothing about Windows, but I expect this has nothing to
SM> do with Emacs itself but instead it's a feature of the OS, where
SM> %ProgramFiles% returns "C:\Program Files" when running a 64bit program
SM> and "C:\Program Files (x86)" when running a 32bit program (and
SM> apparently your Emacs was compiled as a 32bit program).
BTW: Also note that this is *VERY MUCH* dependent on the
"locale" where you use Windoze, i.e. typically on the
language chosen there.
IIRC, in German its "C:\Programme", in French "C:\Programmes"
but I'm pretty sure there are important languages where the
string does not even start with "Program".
For this reason, it's very important that good Windoze software
does *NOT* use any such "C:\Progr*" strings, but rather uses the
environment variables instead, as inidicated
by Stefan's example Emacs-lisp code above.
Thank you, Stefan!
Martin Maechler, ETH Zurich