summaryrefslogtreecommitdiffstats
path: root/docs/cgi-examples
diff options
context:
space:
mode:
authorGuenter Knauf <fuankg@apache.org>2012-09-29 10:29:20 +0200
committerGuenter Knauf <fuankg@apache.org>2012-09-29 10:29:20 +0200
commitd5a3cb2872935299ae034d742f2d4b2955154ffe (patch)
tree04c4f38bfb60ec57c3c582c5bb2256ab431b1d31 /docs/cgi-examples
parentFixed comment. (diff)
downloadapache2-d5a3cb2872935299ae034d742f2d4b2955154ffe.tar.xz
apache2-d5a3cb2872935299ae034d742f2d4b2955154ffe.zip
Changed WScript.Echo to WScript.StdOut.WriteLine because
WScript.Echo seems to mess up output with Locale; avoid Split() usage since it seems not consistent with all versions. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1391772 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/cgi-examples')
-rw-r--r--docs/cgi-examples/printenv.vbs15
1 files changed, 6 insertions, 9 deletions
diff --git a/docs/cgi-examples/printenv.vbs b/docs/cgi-examples/printenv.vbs
index 2b37b47e79..ba8bcbc0ac 100644
--- a/docs/cgi-examples/printenv.vbs
+++ b/docs/cgi-examples/printenv.vbs
@@ -12,21 +12,18 @@
''
Option Explicit
-Dim objShell, objArray, str, env
+Dim objShell, objArray, str, envvar, envval
Set objShell = CreateObject("WScript.Shell")
Set objArray = CreateObject("System.Collections.ArrayList")
-Wscript.Echo "Content-type: text/plain; charset=iso-8859-1" & vbLF
+WScript.StdOut.WriteLine "Content-type: text/plain; charset=iso-8859-1" & vbLF
For Each str In objShell.Environment("PROCESS")
- env = Split(str, "=", 2)
- env(1) = Replace(env(1), vbLF, "\n")
- objArray.Add env(0) & "=" & Chr(34) & env(1) & Chr(34)
+ objArray.Add str
Next
objArray.Sort()
For Each str In objArray
- WScript.Echo str
+ envvar = Left(str, InStr(str, "="))
+ envval = Replace(Mid(str, InStr(str, "=") + 1), vbLF, "\n")
+ WScript.StdOut.WriteLine envvar & Chr(34) & envval & Chr(34)
Next
-'WScript.Echo ScriptEngine & " Version=" & ScriptEngineMajorVersion & "." & _
-' ScriptEngineMinorVersion & "." & ScriptEngineBuildVersion
-