PHP Classes

PHP Detect Encoding: Detect the encoding of text from a file or string

Recommend this page to a friend!

  Detailed description   Download Download .zip .tar.gz   Install with Composer Install with Composer  
This class can detect the encoding of text from a file or string.

It can read the text from a file or a given string and detect different types of the UTF character encoding.

Currently it can distinguish UTF-8, UTF-16, UTF-32 little or big endian encodings. It returns false for unknown encodings.

  Author Author  
Picture of marcelo entraigas
Name: marcelo entraigas <contact>
Classes: 7 packages by
Country: Argentina Argentina
Age: 46
All time rank: 5496 in Argentina Argentina
Week rank: 587 Down6 in Argentina Argentina Equal
Innovation award
Innovation award
Nominee: 1x

  Classes of marcelo entraigas  >  PHP Detect Encoding  >  Download Download .zip .tar.gz  >  Support forum Support forum (1)  >  Blog Blog  
Name: PHP Detect Encoding
Base name: detect-encoding
Description: Detect the encoding of text from a file or string
Version: 1
PHP version: 5
License: BSD License
All time users: 702 users
All time rank: 4671
Week users: 0 users
Week rank: 170 Equal
 
  Groups   Rate classes User ratings   Applications   Files Files  

  Groups  
Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes
Group folder image Text processing Manipulating and validating text data View top rated classes


  Innovation Award  
PHP Programming Innovation award nominee
January 2014
Number 6
Sometimes it is necessary to process text in a way that depends on which character encoding is used.

However, in some circumstances it may not be possible to know for sure what is the encoding of the text.

This class can guess the character encoding by analyzing part of the text.

Manuel Lemos

  User ratings  
RatingsUtility Consistency Documentation Examples Tests Videos Overall Rank
All time: Good (91%) Good (83%) - - - - Not sure (54%) 2009
Month: Not yet rated by the users

  Applications that use this package  
No pages of applications that use this class were specified.

Add link image If you know an application of this package, send a message to the author to add a link here.

  Files folder image Files  
File Role Description
Plain text file DetectEncoding.php Class Main php file

Install with Composer Install with Composer - Download Download all files: detect-encoding.tar.gz detect-encoding.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.
  Files folder image Files  
File Role Description
Plain text file DetectEncoding.php Class Main php file

Install with Composer Install with Composer - Download Download all files: detect-encoding.tar.gz detect-encoding.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.