> Benct Philip Jonsson wrote:
>> Is the encoding used in the Windows Command Prompt
>> "cp850"?  I need to know that to use the Encode
>> module to convert in order to have perl handle
>> accented characters right.

Reinhard Pagitsch replied:

Try chcp in a DOS BOX, this shows you the active code page in command
prompt.
(on my XP it shows me 850 which is cp850)


From the command prompt of my win98 box:

C:\WINDOWS>chcp
Active code page: 850

C:\WINDOWS>mode con cp

Active code page for device CON is 850
Prepared code pages:
  code page 850

MODE status code page function completed

You can get this info programatically in perl using Win32::Console, which you should do, as you have no guarantee that any particular console is actually using cp850.

C:\WINDOWS>perl -MWin32::Console -e "print Win32::Console::OutputCP()"
850

Regards,
Rob.
--
Robert May
Win32::GUI, a perl extension for native Win32 applications
http://perl-win32-gui.sourceforge.net/

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to