PHP Classes
elePHPant
Icontem

UTF8: Convert text between UTF-8 and other encodings

Recommend this page to a friend!
  Info   View files View files (15)   DownloadInstall with Composer Download .zip   Reputation   Support forum (3)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2006-05-21 (10 years ago) RSS 2.0 feedStarStarStar 54%Total: 6,660 All time: 296 This week: 1,068Down
Version License Categories
utf8 1.0.0BSD LicenseText processing, Conversion
Description Author

This class is meant to convert text encoded as single byte string encodings such as CP1251 to UTF-8 multibyte format and vice versa.

The class loads character set from mapping files. Please access ftp://ftp.unicode.org/Public/MAPPINGS/ to obtain the mapping files that you need.

The directory from where the map files may be loaded is pre-configured in the class. Each supported character set is also pre-configured in the class to point to the respective mapping file.

The error handling function onError may be overriden in a subclass if necessary.

Innovation Award
PHP Programming Innovation award nominee
November 2004
Number 2


Prize: One copy of the Zend Studio
When it is necessary to combine text that uses multiple character sets in the same document, using Unicode is often the only solution that can be used, as it includes all the text characters of most of the idioms used in the world. UTF-8 is an ASCII compatible encoding for 8 bit character texts.

PHP has functions to convert between ISO Latin 1 and UTF-8. To make conversions between other character sets it is necessary to use the multi-byte text string extension.

This class provides an alternative solution to implement the conversion of text in any character set to UTF-8 and vice-versa. It does not rely on special extensions and can be used in practically any PHP version.

Manuel Lemos
Picture of Alexandar Minkovsky
Name: Alexandar Minkovsky <contact>
Classes: 3 packages by
Country: Bulgaria Bulgaria
Innovation award
Innovation award
Nominee: 2x

  Files folder image Files  
File Role Description
Accessible without login Plain text file CP1250.MAP Data MAP file
Accessible without login Plain text file CP1251.MAP Data MAP file
Accessible without login Plain text file CP1252.MAP Data MAP file
Accessible without login Plain text file CP1253.MAP Data MAP file
Accessible without login Plain text file CP1254.MAP Data MAP file
Accessible without login Plain text file CP1255.MAP Data MAP file
Accessible without login Plain text file CP1256.MAP Data MAP file
Accessible without login Plain text file CP1257.MAP Data MAP file
Accessible without login Plain text file CP1258.MAP Data MAP file
Accessible without login Plain text file CP874.MAP Data MAP file
Accessible without login Plain text file CP932.MAP Data MAP file
Accessible without login Plain text file CP936.MAP Data MAP file
Accessible without login Plain text file CP949.MAP Data MAP file
Accessible without login Plain text file CP950.MAP Data MAP file
Plain text file utf8.class.php Class main class file

 Version Control Unique User Downloads Download Rankings  
 0%
Total:6,660
This week:0
All time:296
This week:1,068Down
User Ratings User Comments (1)
 All time
Utility:90%StarStarStarStarStar
Consistency:87%StarStarStarStarStar
Documentation:-
Examples:-
Tests:-
Videos:-
Overall:54%StarStarStar
Rank:1716