This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Bug: Cygwin won't export environ vars to win32 programs, when the current work dir contains non-ascii characters.
- From: Lenik <lenik at bodz dot net>
- To: cygwin at cygwin dot com
- Date: Wed, 29 Apr 2009 16:20:15 +0800
- Subject: Bug: Cygwin won't export environ vars to win32 programs, when the current work dir contains non-ascii characters.
(Following example is based on bash, but the same to ash, tcsh, ksh,
etc., so this should be bug of cygwin.)
(1) English only:
C:\Profiles\Shecti\test>bash -c "cmd /c set"
ALLUSERSPROFILE=C:\Profiles\All Users
APPDATA=C:\Profiles\Shecti\Application Data
CLIENTNAME=Console
COMMONPROGRAMFILES=C:\Program Files\Common Files
COMPUTERNAME=CLSVM
COMSPEC=C:\WINDOWS\system32\cmd.exe
CYGWIN=nodosfilewarning noenvcache title
FP_NO_HOST_CHECK=NO
HOME=C:\Profiles\Shecti
HOMEDRIVE=C:
HOMEPATH=\Profiles\Shecti
LABJA_ROOT=c:\lenix
LOGONSERVER=\\CLSVM
NUMBER_OF_PROCESSORS=1
OS=Windows_NT
PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\lenix\bin
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 9, GenuineIntel
PROCESSOR_LEVEL=15
PROCESSOR_REVISION=0409
PROGRAMFILES=C:\Program Files
PROMPT=$P$G
PWD=/mnt/c/Profiles/Shecti/test
SESSIONNAME=Console
SHLVL=1
SYSTEMDRIVE=C:
SYSTEMROOT=C:\WINDOWS
TEMP=C:\Profiles\Shecti\Temp
TERM=cygwin
TMP=C:\Profiles\Shecti\Temp
USERDOMAIN=CLSVM
USERNAME=Shecti
USERPROFILE=C:\Profiles\Shecti
WINDIR=C:\WINDOWS
_=/mnt/c/WINDOWS/system32/cmd
(2) With Chinese characters, most variables are lost:
C:\Profiles\Shecti\æè>bash -c "cmd /c set"
COMSPEC=C:\WINDOWS\system32\cmd.exe
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.JS;.WS
PROMPT=$P$G
C:\Profiles\Shecti\æè>
This problem seems only related to the working directory name, other
environ variables are ok to include native characters:
C:\Profiles\Shecti\test>set hello=Hello
C:\Profiles\Shecti\test>bash -c "cmd /c set h"
HOME=C:\Profiles\Shecti
HOMEDRIVE=C:
HOMEPATH=\Profiles\Shecti
hello=Hello
C:\Profiles\Shecti\test>set hello=äå
C:\Profiles\Shecti\test>bash -c "cmd /c set h"
HOME=C:\Profiles\Shecti
HOMEDRIVE=C:
HOMEPATH=\Profiles\Shecti
hello=äå
C:\Profiles\Shecti\test>set hello=
C:\Profiles\Shecti\test>bash -c "env hello=äå cmd /c set h"
HOME=C:\Profiles\Shecti
HOMEDRIVE=C:
HOMEPATH=\Profiles\Shecti
hello=äå
C:\Profiles\Shecti\test>set h
HOMEDRIVE=C:
HOMEPATH=\Profiles\Shecti
C:\Profiles\Shecti\test>bash -c "env CWD=äå cmd /c set c"
CLIENTNAME=Console
COMMONPROGRAMFILES=C:\Program Files\Common Files
COMPUTERNAME=CLSVM
COMSPEC=C:\WINDOWS\system32\cmd.exe
CWD=äå
C:\Profiles\Shecti\test>md äå
C:\Profiles\Shecti\test>cd äå
C:\Profiles\Shecti\test\äå>bash -c "cmd /c set h"
çååé h ææåä (Error: no environ variable starts with 'H')
C:\Profiles\Shecti\test\äå>
Attachment:
cygcheck.out
Description: Text document
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/