We have a bunch of surrogate pairs (or 2-byte utf8?) Characters, such as �� which are emojis prayer hands stored as UTF8 as 2 characters. When rendering in the browser, this line is displayed as two?
example: 🙏
I need to convert them to emjoi hands using php, but I just can't find a combination of iconv, utf8_decode, html_entity_decode etc. to disable it.
This site correctly converts �� :
http://www.convertstring.com/EncodeDecode/HtmlDecode
Insert the following line there
Please join me in this prayer. ��❤️
You will notice that the pair of supragates 🙏 ( �� ) is converted to 🙏
This site requires the use of HTMLDecode, but I cannot find anything inside php to remove this. I tried: Iconv html_entity_decode and several public libraries.
I admit that I am not an expert when it comes to converting characters around!
source share