On 22/03/2021 17:38, Alexandru Pătrănescu wrote:
As Rowan mentioned, base64_encode would have worked. But that means one quarter of the available max column space would be lost as a downside.
Depending on the data, abusing Latin1-to-UTF8 translation can easily result in a longer string than base64.
$str = '🤡🤡'; echo strlen(base64_encode($str)); // 12 echo strlen(utf8_encode($str)); // 16 Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php
