The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Encode::Locale - Determine the locale encoding

SYNOPSIS

  use Encode::Locale;
  use Encode;

  $string = decode(locale => $octets);

DESCRIPTION

Perl uses Unicode to represent strings internally but many of the interfaces it has to the outside world is still byte based. Programs therefore needs to decode strings that enter the program from the outside and encode them again on the way out.

The POSIX locale system is used to specify both the language conventions to use and the prefered character set to consume and output. This module looks up the charset (called a CODESET in the locale jargon) and arrange for the Encode module to know this encoding under the name "locale".

In addition the following functions and variables are provided:

decode_argv()

This will decode the command line arguments to perl (the @ARGV array) in-place.

$LOCALE_CODESET

The encoding name determined to be suitable for the current locale.

SEE ALSO

I18N::Langinfo, Encode

AUTHOR

Copyright 2010 Gisle Aas <gisle@aas.no>.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.