Remove Strange Font Coding
Asked Answered
T

1

5

Hi im hoping this is a simple issue I am loading some simple data via an API however some users have made their username's in fancy fonts as below.

๐“ฆ๐“ฎ๐“ซ ๐“ก๐“ฎ๐“น๐“ธ๐“ผ๐“ฝ๐“ผ

How to do I convert this to a simple standard encoding using PHP so it would display as.

Web Reposts

Thank you

Telemetry answered 9/3, 2019 at 20:11 Comment(0)
I
5
<?php
echo(Normalizer::normalize("๐“ฆ๐“ฎ๐“ซ ๐“ก๐“ฎ๐“น๐“ธ๐“ผ๐“ฝ๐“ผ", Normalizer::FORM_KC));

(If you want, you can use form KD instead of KC.) See https://secure.php.net/manual/en/class.normalizer.php for more details.

Impinge answered 9/3, 2019 at 20:15 Comment(0)

© 2022 - 2024 โ€” McMap. All rights reserved.