Encode::Encoding

Encode::Encoding is a Perl module used to encode implementation base classes.
Download

Encode::Encoding Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Dan Kogai
  • Publisher web site:
  • http://search.cpan.org/~oyama/Crypt-Camellia-2.01/lib/Crypt/Camellia.pm

Encode::Encoding Tags


Encode::Encoding Description

Encode::Encoding is a Perl module used to encode implementation base classes. Encode::Encoding is a Perl module used to encode implementation base classes.SYNOPSIS package Encode::MyEncoding; use base qw(Encode::Encoding); __PACKAGE__->Define(qw(myCanonical myAlias));As mentioned in Encode, encodings are (in the current implementation at least) defined as objects. The mapping of encoding name to object is via the %Encode::Encoding hash. Though you can directly manipulate this hash, it is strongly encouraged to use this base class module and add encode() and decode() methods.Methods you should implementYou are strongly encouraged to implement methods below, at least either encode() or decode().->encode($string )MUST return the octet sequence representing $string.· If $check is true, it SHOULD modify $string in place to remove the converted part (i.e. the whole string unless there is an error). If perlio_ok() is true, SHOULD becomes MUST.· If an error occurs, it SHOULD return the octet sequence for the fragment of string that has been converted and modify $string in-place to remove the converted part leaving it starting with the problem fragment. If perlio_ok() is true, SHOULD becomes MUST.· If $check is is false then encode MUST make a "best effort" to convert the string - for example, by using a replacement character.->decode($octets ) MUST return the string that $octets represents.· If $check is true, it SHOULD modify $octets in place to remove the converted part (i.e. the whole sequence unless there is an error). If perlio_ok() is true, SHOULD becomes MUST.· If an error occurs, it SHOULD return the fragment of string that has been converted and modify $octets in-place to remove the converted part leaving it starting with the problem fragment. If perlio_ok() is true, SHOULD becomes MUST.· If $check is false then decode should make a "best effort" to convert the string - for example by using Unicode's "x{FFFD}" as a replacement character.If you want your encoding to work with encoding pragma, you should also implement the method below.->cat_decode($destination, $octets, $offset, $terminator ) MUST decode $octets with $offset and concatenate it to $destination. Decoding will terminate when $terminator (a string) appears in output. $offset will be modified to the last $octets position at end of decode. Returns true if $terminator appears output, else returns false. Requirements: · Perl


Encode::Encoding Related Software