NAME

Lingua::Charsets - Provides a list of charsets by language.

SYNOPSIS

my $lc = Lingua::Charsets->new;

my $zh_charsets = $lc->charsets_for( 'zh' );

DESCRIPTION

This module provides a listing of charsets by language. It can be used in conjunction with a charset guessing algorithm such as Encode::Guess.

The data used comes from a variety of locations; however, the initial source was The W3C charset listing available at:

http://www.w3.org/International/O-charset-lang.html

METHODS

language_charsets

Returns a HashRef[ArrayRef[Str]] consisting of ISO-639-1 language codes as hash keys and an array of charsets has the hash values.

charsets_for( $language )

Returns an ArrayRef[Str] of charsets for the language if found.

SEE ALSO

Encode::Guess, Lingua::RU::Charset

REFERENCES

W3.org "I18N languages, countries and character sets" page at:

http://www.w3.org/International/O-charset-lang.html

Additional information can be found at:

http://en.wikipedia.org/wiki/Character_encoding

http://www.mnogosearch.org/doc/msearch-international.html

Aliases are listed in the mnoGoSearch webpage; however, they are not currently included as aliases would not be useful for decoding. They may be added as a separate reference in the future if they are deemed useful.

AUTHOR

John Wang <john@johnwang.com>

COPYRIGHT AND LICENSE (The MIT License)

Copyright (c) 2011 John Wang <john@johnwang.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.