This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From http://www.php.net/manual/en/function.chr.php#55978: | |
"I spent hours looking for a function which would take a numeric HTML entity value and output the appropriate UTF-8 bytes. | |
I found this at another site and only had to modify it slightly; so I don't take credit for this." | |
<?php function unichr($dec) { | |
if ($dec < 128) { | |
$utf = chr($dec); | |
} else if ($dec < 2048) { | |
$utf = chr(192 + (($dec - ($dec % 64)) / 64)); |