PHP Classes

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

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 48%Total: 704 All time: 4,673 This week: 49Up
Version License PHP version Categories
detect-encoding 1BSD License5PHP 5, Text processing
Description 

Author

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.

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
Picture of marcelo entraigas
Name: marcelo entraigas <contact>
Classes: 7 packages by
Country: Argentina Argentina
Age: 47
All time rank: 5476 in Argentina Argentina
Week rank: 227 Up3 in Argentina Argentina Up
Innovation award
Innovation award
Nominee: 1x

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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:704
This week:0
All time:4,673
This week:49Up
 User Ratings  
 
 All time
Utility:81%StarStarStarStarStar
Consistency:75%StarStarStarStar
Documentation:-
Examples:-
Tests:-
Videos:-
Overall:48%StarStarStar
Rank:3008