Unicode encoding point in PHP
In PHP, it is a common task to obtain characters corresponding to the specified Unicode encoding point. Unicode is a character encoding standard used to represent text across different platforms and languages.Question: How to get the characters of U 010F? For example, how to get the characters corresponding to the U 010F Unicode encoding point? This encoding point corresponds to the Latin lowercase letter o with pointed notes, or “ó”.
Answer:
PHP provides several functions to handle Unicode encoding points:
hexdec()var_dump(hexdec('010F')); var_dump(mb_ord('ó')); // 243 var_dump(mb_chr(243)); // ó
var_dump(hexdec('010F'));
var_dump(mb_ord('ó')); // 243
var_dump(mb_chr(243)); // ó
int(271)
int(243)
string(1) "ó" Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.
Copyright© 2022 湘ICP备2022001581号-3