Josh Myer > Encode-HEBCI > Encode::HEBCI

Download:
Encode-HEBCI-0.02.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.01   Source  

NAME ^

HEBCI - HTML Entity Based Codepage Inference

SYNOPSIS ^

    use Encode::HEBCI;

    $hebci = new Encode::HEBCI();
    @fingerprint_entities = $hebci->supported_entities();
    @possible_encodings = $hebci->fingerprint(%entities_to_values);

DESCRIPTION ^

The Encode::HEBCI module provides a mechanism to determine the character encoding used to submit an HTML form. It does this by using the encoded values of specially-chosen HTML entities to infer which encodings were possibly used, returning a list to the user.

Full details are available at the HEBCI homepage, http://www.joshisanerd.com/set/.

MODULE ^

To use the module, simply use it.

    use Encode::HEBCI;

Methods

Encode::HEBCI->new()

Returns a new HEBCI object.

Encode::HEBCI->supported_entities();

Returns an array containing the HTML entities that will give the best fingerprint, in order of decreasing utility.

Encode::HEBCI->fingerprint(%entity_values)

Returns an array of possible encodings given the values in %entity_values. %entity_values should be a hash with keys of HTML entity names (i.e. without the ampersand or semicolon) to the raw bytes returned to your application by the webbrowser.

Encode::HEBCI->supported_encodings()

Returns an array containing the encodings this copy of HEBCI can distinguish between.

Encode::HEBCI->master_fingerprints()

Returns the fingerprint table. You probably don't want this.

EXAMPLES ^

An example CGI is distributed with the source code.

syntax highlighting: