John Wang > Lingua-Charsets-0.04 > Lingua::Charsets

Download:
Lingua-Charsets-0.04.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.04   Source  

NAME ^

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

SYNOPSIS ^

    use Lingua::Charsets;

        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 consisting of ISO-639-1 language codes as hashref keys. The hashref values are hashrefs with the key 'charsets' that consists of an arrayref of charsets.

charsets_for( $iso_639_1_code )

Returns an ArrayRef[Str] of charsets for the language's ISO-639-1 code. An empty ArrayRef is returned if the language isn't found.

SEE ALSO ^

Encode::Guess, Encode::JP, Encode::KR, 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://aspell.net/charsets/

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 <johncwang@gmail.com>

COPYRIGHT ^

Copyright 2013 by John Wang <johncwang@gmail.com>.

This software is released under the MIT license cited below.

The "MIT" License

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.

syntax highlighting: