Win32-Codepage
view release on metacpan or search on metacpan
lib/Win32/Codepage.pm view on Meta::CPAN
print "Install language: " . Win32::Codepage::get_install_codepage() . "\n";
use Encode qw(encode);
my $w32encoding = Win32::Codepage::get_encoding(); # e.g. "cp1252"
my $encoding = $w32encoding ? Encode::resolve_alias($w32encoding) : '';
print $encoding ? encode($string, $encoding) : $string;
=head1 DESCRIPTION
This module is intended as a companion to Win32::Locale. That module
offers information about user prefs for language and locale. However,
Windows has a separate setting for how files and filenames are encoded
by default, which is specified by the "codepage" (a legacy term from
DOS days). It is possible to be on a computer whose language, date,
currency, etc are set to English, but the file contents and filesystem
names default to SHIFT-JIS (Japanese) encoding.
This module offers information about that codepage, which allows your
Perl code to know what encoding to expect for file names and file
contents.
( run in 0.510 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )