27 May 2008 20:50:44 UTC
- Distribution: Encode-Detect
- Module version: 1.01
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (14)
- Testers (4932 / 222 / 3)
- KwaliteeBus factor: 0
- 54.42% Coverage
- License: open_source
- Activity24 month
- Download (175.49KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
- SEE ALSO
Encode::Detect::Detector - Detects the encoding of data
use Encode::Detect::Detector; my $charset = detect($octets); my $d = new Encode::Detect::Detector; $d->handle($octets); $d->handle($more_octets); $d->end; my $charset = $d->getresult;
This module provides an interface to Mozilla's universal charset detector, which detects the charset used to encode data.
Detect the charset used to encode the data in $octets and return the charset's name. Returns undef if the charset cannot be determined with sufficient confidence.
Creates a new
Encode::Detect::Detectorobject and returns it.
Provides an additional chunk of data to be examined by the detector. May be called multiple times.
Returns zero on success, nonzero if a memory allocation failed.
Informs the detector that there is no more data to be examined. In many cases, this is necessary in order for the detector to make a decision on the charset.
Resets the detector to its initial state.
Returns the name of the detected charset or
undefif no charset has (yet) been decided upon. May be called at any time.
John Gardiner Myers <email@example.com>
For help and thank you notes, e-mail the author directly. To report a bug, submit a patch, or add to the wishlist please visit the CPAN bug manager at: http://rt.cpan.org
Module Install Instructions
To install Encode::Detect, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Encode::Detect
For more information on module installation, please visit the detailed CPAN module installation guide.