PHP String Encoding Helper (UTF-8) to fix mixed encoded strings.
composer require jakiboy/encoder
use Encoding\Encoder;
$string = 'Monétius nôs tumore înusità to quàdam et novo ut rebèllis';
echo (new Encoder())->sanitize($string);
Monétius nôs tumore înusitàto quàdam et novo ut rebèllis
use Encoding\Encoder;
$string = 'Монётиусę ėįšнôс тумореųūž îнуситàто qуодам ет ново ут ребэллис';
echo (new Encoder(true, 'TRANSLIT'))->sanitize($string);
Монётиусę ėįšнôс тумореųūž îнуситàто qуодам ет ново ут ребэллис
use Encoding\Encoder;
$string = 'Монётиусę ėįšнôс тумореųūž îнуситàто qуодам ет ново ут ребэллис';
echo (new Encoder(true, 'IGNORE'))->sanitize($string);
ô îà q
- Jihad Sinnaour - Jakiboy (Initial work)
See also the full list of contributors who participated in this project. Any suggestions (Pull requests) are welcome!
This project is licensed under the MIT License - see the LICENSE file for details.
Please give it a Star if you like the project.