Return-Path: X-Original-To: apmail-httpd-cvs-archive@www.apache.org Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EBA7D95A8 for ; Sat, 29 Sep 2012 08:30:08 +0000 (UTC) Received: (qmail 60378 invoked by uid 500); 29 Sep 2012 08:30:08 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 60165 invoked by uid 500); 29 Sep 2012 08:30:07 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 60151 invoked by uid 99); 29 Sep 2012 08:30:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 29 Sep 2012 08:30:07 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 29 Sep 2012 08:30:04 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id BFDDB23888E4; Sat, 29 Sep 2012 08:29:20 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1391772 - /httpd/httpd/trunk/docs/cgi-examples/printenv.vbs Date: Sat, 29 Sep 2012 08:29:20 -0000 To: cvs@httpd.apache.org From: fuankg@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120929082920.BFDDB23888E4@eris.apache.org> Author: fuankg Date: Sat Sep 29 08:29:20 2012 New Revision: 1391772 URL: http://svn.apache.org/viewvc?rev=1391772&view=rev Log: 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. Modified: httpd/httpd/trunk/docs/cgi-examples/printenv.vbs Modified: httpd/httpd/trunk/docs/cgi-examples/printenv.vbs URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/cgi-examples/printenv.vbs?rev=1391772&r1=1391771&r2=1391772&view=diff ============================================================================== --- httpd/httpd/trunk/docs/cgi-examples/printenv.vbs (original) +++ httpd/httpd/trunk/docs/cgi-examples/printenv.vbs Sat Sep 29 08:29:20 2012 @@ -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 -