Win32::Codepage::Simple - get codepage, simply


Win32-Codepage-Simple documentation Contained in the Win32-Codepage-Simple distribution.

Index


Code Index:

NAME

Top

Win32::Codepage::Simple - get codepage, simply

VERSION

Top

Version 0.01

SYNOPSIS

Top

 use Win32::Codepage::Simple qw(get_codepage);

 my $cpnum = get_codepage();

EXPORT

Top

A list of functions that can be exported.

get_codepage()

synonym for get_acp.

get_acp()

get ansi code page.

get_oemcp()

get oem code page.

AUTHOR

Top

YAMASHINA Hio, <hio at cpan.org>

BUGS

Top

Please report any bugs or feature requests to bug-win32-codepage-simple at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Win32-Codepage-Simple. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

Top

You can find documentation for this module with the perldoc command.

    perldoc Win32::Codepage::Simple

You can also look for information at:

* AnnoCPAN: Annotated CPAN documentation

http://annocpan.org/dist/Win32-Codepage-Simple

* CPAN Ratings

http://cpanratings.perl.org/d/Win32-Codepage-Simple

* RT: CPAN's request tracker

http://rt.cpan.org/NoAuth/Bugs.html?Dist=Win32-Codepage-Simple

* Search CPAN

http://search.cpan.org/dist/Win32-Codepage-Simple

COPYRIGHT & LICENSE

Top


Win32-Codepage-Simple documentation Contained in the Win32-Codepage-Simple distribution.

package Win32::Codepage::Simple;

use warnings;
use strict;

our $VERSION = '0.01';

require Exporter;
our @ISA = qw(Exporter);
our @EXPORT_OK = qw(get_codepage get_acp get_oemcp);

our $get_acp;
our $get_oemcp;

&_init;
1;

sub _init
{
	eval
	{
		local($SIG{__DIE__}, $@) = 'DEFAULT';
		require Win32::API;
		
		$get_acp   = Win32::API->new("kernel32", "GetACP",   "", "N");
		$get_oemcp = Win32::API->new("kernel32", "GetOEMCP", "", "N");
		1;
	};
}

sub get_codepage
{
	&get_acp;
}

sub get_acp
{
	$get_acp && $get_acp->Call();
}

sub get_oemcp
{
	$get_oemcp && $get_oemcp->Call();
}

# -----------------------------------------------------------------------------
# End of File.
# -----------------------------------------------------------------------------