paquettg/string-encode
Flexible PHP string encoding helper for multibyte text. Convert strings safely between encodings (UTF-8 by default) with a fluent API, plus utilities for encoding-aware regex handling. Supports PHP 7.2–7.4.
String Encode is a PHP is a simple, flexible, package with the goal of assisting developers with handling MB strings and encodings.
Install the latest version using composer.
$ composer require paquettg/string-encode
<?php
use StringEncoder\Encoder;
$str = "Calendrier de l'avent façon Necta!";
$encoder = new Encoder();
$newstr = $encoder->convert()->fromString($str)->toString();
echo $newstr; // "Calendrier de l'avent façon Necta!" in UTF-8 encoding (default)
Get supported String Encoder and help fund the project with the Tidelift Subscription.
Tidelift delivers commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use.
Bugs and feature requests are tracked on GitHub
Gilles Paquette See also the list of contributors who participated in this project.
String Encode is licensed under the MIT License - see LICENSE file for details.
How can I help you explore Laravel packages today?