[Win32utils-devel] Temporarily setting the output language forcmd.exe
phasis at gmail.com
Fri Jan 18 11:00:08 EST 2008
2008/1/19, Berger, Daniel <Daniel.Berger at qwest.com>:
> > -----Original Message-----
> > From: win32utils-devel-bounces at rubyforge.org
> > [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of
> > Heesob Park
> > Sent: Thursday, January 17, 2008 9:03 PM
> > To: Development and ideas for win32utils projects
> > Subject: Re: [Win32utils-devel] Temporarily setting the
> > output language forcmd.exe
> > Hi,
> > 2008/1/18, Daniel Berger <djberg96 at gmail.com >:
> > Hi all,
> > One of the net-ping users reported that the
> > Net::Ping::External library
> > was returning false positives on Vista. Basically, it
> > does a 'ping -n1
> > host' and checks for certain error strings.
> > The problem is that the error strings it checks for are
> > in English. The
> > user in question is using a cmd.exe that's entirely in
> > Swedish (I think).
> > Is there any way I can temporarily set the language of
> > the command
> > console so that it emits English only? I tried
> > setlocale() but that
> > didn't work. Perhaps a registry setting somewhere? Or
> > an explicit 'cmd
> > /c' call with some other special option?
> > Thanks,
> > Dan
> > In the cmd.exe console window, Run "chcp 437".
> Hm, I've tried playing around with it, but it doesn't seem to change the
> language output of ping. However, that could very well have to do with
> the way this machine is configured.
> Heesob, does it work for you? I mean, do you have your console set to
> use Korean, but ping emits English for you if you do chcp 437 && ping
> -n1 www.ruby-lang.org?
> This communication is the property of Qwest and may contain confidential
> privileged information. Unauthorized use of this communication is strictly
> prohibited and may be unlawful. If you have received this communication
> in error, please immediately notify the sender by reply e-mail and destroy
> all copies of the communication and any attachments.
> win32utils-devel mailing list
> win32utils-devel at rubyforge.org
In my XP Prof, ping alway emits English whatsoever code page.
But in my Vista, ping emit different message for each code page.
chcp 437 && ping -n1 www.ruby-lang.org emits:
Active code page: 437
Pinging carbon.ruby-lang.org [22.214.171.124] with 32 bytes of data:
Reply from 126.96.36.199: bytes=32 time=287ms TTL=39
Ping statistics for 188.8.131.52:
Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 287ms, Maximum = 287ms, Average = 287ms
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the win32utils-devel