GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  ENCODE::DETECT::DETECTOR (3)

.ds Aq ’

NAME

Encode::Detect::Detector - Detects the encoding of data

CONTENTS

SYNOPSIS



  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;



DESCRIPTION

This module provides an interface to Mozilla’s universal charset detector, which detects the charset used to encode data.

METHODS

CW$charset = Encode::Detect::Detector->detect($octets)

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.

CW$d = Encode::Detect::Detector->new()

Creates a new Encode::Detect::Detector object and returns it.

CW$d->handle($octets)

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.

CW$d->eof

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.

CW$d->reset

Resets the detector to its initial state.

CW$d->getresult

Returns the name of the detected charset or undef if no charset has (yet) been decided upon. May be called at any time.

SEE ALSO

Encode::Detect

AUTHOR

John Gardiner Myers <jgmyers@proofpoint.com>

SUPPORT

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
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 ENCODE::DETECT::DETECTOR (3) 2016-03-17

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.