mbstring extension
- Enable extension in
php.ini
file:
extension=mbstring
- Get character by Unicode code point:
<?php
$code = 'U+2122';
$codeDec = hexdec(substr($code, 2));
$character = mb_chr($codeDec);
echo $character; // ™
php.ini
file:extension=mbstring
<?php
$code = 'U+2122';
$codeDec = hexdec(substr($code, 2));
$character = mb_chr($codeDec);
echo $character; // ™
Leave a Comment
Cancel reply