PHP Classes

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 (1)    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 126 All time: 9,330 This week: 284Up
Version License PHP version Categories
php-utf8-decode-fren 1.0GNU General Publi...5PHP 5, Text processing


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 winner
February 2021

Prize: SourceGuarding PHP encoder tool
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: 10 packages by
Country: Niger Niger
Age: 39
All time rank: 21921 in Niger Niger
Week rank: 178 Up1 in Niger Niger Equal
Innovation award
Innovation award
Nominee: 2x

Winner: 1x



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 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  
This week:0
All time:9,330
This week:284Up