UTF-8 Multibyte String Encoding Decode in php12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849# Hexadecimal## utf-8 (ASCII)# \x2a## utf-8 (2-byte)# \xC3\xa9## utf-8 (3-byte)# \xe5\x8f\x82## utf-8 (4-byte)# \xF0\x9F\x98\x81## decode in php$str = "\xe5\x8f\x82";echo mb_convert_encoding($str, 'utf-8');# output: 参echo mb_convert_encoding($str, mb_detect_encoding($str));# Decimal## \ud83d\ude01## decode in php$str = "\ud83d\ude01";echo json_decode('"' . '\ud83d\ude01' . '"');# output: [smile]# HTML Entities encoding and UTF-16# # ¼# \x10\x00## decode in phpecho mb_convert_encoding('¼', 'UTF-8', 'HTML-ENTITIES');# output: ¼echo mb_convert_encoding("\x10\x00", 'UTF-8', 'UTF-16BE');# output: က. Referencehttps://stackoverflow.com/questions/6058394/unicode-character-in-php-string Newer zsh, oh-my-zsh and powerlevel9k Older IT automation 2 - Ansible Playbook