Login   Register  
PHP Classes
elePHPant
Icontem

UTF8

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

  Author  
Picture of Alexandar Minkovsky
Name: Alexandar Minkovsky <e-mail contact>
Packages: 3 Browse all classes by Alexandar Minkovsky Browse all classes by
Country: Bulgaria Bulgaria - PHP jobs in Bulgaria
Age: 42
All time rank: 1451 in Bulgaria Bulgaria
Week rank: 458 Down2 in Bulgaria Bulgaria Down
Innovation award
Innovation award
Nominee: 2x


  Detailed description   Download .zip .tar.gz  
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.

  Classes of Alexandar Minkovsky  >  UTF8  >  Download .zip .tar.gz  >  Support forum Support forum (3)  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: UTF8
Base name: utf8
Description: Convert text between UTF-8 and other encodings
Version: -
PHP version: -
License: BSD License
All time users: 6507 users
All time rank: 268
Week users: 0 users
Week rank: 2051 Equal
 
  Groups   Rate classes User ratings   Trackback   Applications   Files Files  

  Groups  
Group folder image Text processing Manipulating and validating text data View top rated classes
Group folder image Conversion Unit and datatype conversion View top rated classes


  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

  User ratings  
Ratings
Utility
Consistency
Documentation
Examples
Tests
Videos
Overall
Rank
All time:
Good (90.4%)
Good (87.5%)
-
-
-
-
Not sure (53.9%)
1274
Month:
Not yet rated by the users

  Trackback links  
Link Description
And not a quick solution to the problem of optimizing the conversion to UTF-8 Well, imagine you are working for the Arabic site (yes, Balbi HP) has been the use of aspire encoding Windows-1256 or CP-1256 (also Ismoh in open source communities), and requested the transfer of the whole site to UTF-8 to deal with Alojacks smoothly! !...

  Applications that use this class  
No application links were specified for this class.
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
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

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