PHP Convert UTF8 to Latin1 UTF8 Encoded: Convert latin characters that were double-encoded

Recommend this page to a friend!
  Info   View files Example   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2021-02-05 (27 days ago) RSS 2.0 feedNot enough user ratingsTotal: 67 This week: 2All time: 9,795 This week: 164Up
Version License PHP version Categories
php-utf8-decode-fren 1.0GNU General Publi...5PHP 5, Text processing
Description Author

This class can convert latin characters that were double-encoded.

It can take as parameter a string that has latin characters with accents and cedillas but were encoded twice as utf8.

The class replaces the double encoded latin characters with the correct characters in UTF-8.

It can also check if a string has a correct representation of text string in UTF-8.

Innovation Award
PHP Programming Innovation award nominee
February 2021
Nominee
Vote
Sometimes applications store text that was given by the application users using UTF-8 encoded.

However, due to programming mistakes, the application may encode the text again as UTF-8, when it was already encoded as UTF-8. This mistake is called double-encoding.

To fix the text that was double encoded, it it is necessary to revert the last step of encoding of the characters.

This class provides a solution, that not only can undo the double-encoding mistake, but it is also able to detect the encoding of a given text, so you can evaluate what encoding it is using.

Manuel Lemos
Picture of Hassane Moussa
  Performance   Level  
Name: Hassane Moussa <contact>
Classes: 8 packages by
Country: Niger Niger
Innovation award
Innovation award
Nominee: 2x

Details

PHP-Utf8-Decode-French-Accents-Encoded

This PHP class can decode UTF8 encoded strings for French special characters.

It extends the Utf8DecodeFrenchAccentsEncoded PHP class to provide functions that can detects character encoding on a given string and can decode utf8 encoded Accents characters of French language.

The class functions take the string encoded as parameter to show the string decode in utf8. For is_utf8() function, it return a boolean.

  Files folder image Files  
File Role Description
Accessible without login Plain text file example.php Example Example script
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Image file screenshot.JPG Data Auxiliary data
Plain text file Utf8DecodeFrenchAccentsEncoded.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:67
This week:2
All time:9,795
This week:164Up

For more information send a message to info at phpclasses dot org.