[Win32utils-devel] Temporarily setting the output languageforcmd.exe
Daniel.Berger at qwest.com
Fri Jan 18 12:49:01 EST 2008
> 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 [188.8.131.52] with 32 bytes of data:
> Reply from 184.108.40.206: bytes=32 time=287ms TTL=39
> Ping statistics for 220.127.116.11:
> Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
> Approximate round trip times in milli-seconds:
> Minimum = 287ms, Maximum = 287ms, Average = 287ms
Here's another question. Why, if I set the code page to 437, does
GetACP() return 1252?
C:\Documents and Settings\djberge>chcp 437
Active code page: 437
C:\Documents and Settings\djberge>irb
irb(main):001:0> require 'windows/national'
irb(main):002:0> include Windows::National
I realise 1252 is "Latin 1" while 437 is "United States", but I'm
curious why they're different here. Am I confusing two different things?
This communication is the property of Qwest and may contain confidential or
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.
More information about the win32utils-devel