This is basically URL decoding to the decimal code but nothing in PHP works how you'd expect it.
Here are online tools to verify and check your work, it's important when querying databases with non-English characters:
http://yehg.net/encoding/index.php#
http://meyerweb.com/eric/tools/dencoder/
http://www.codetable.net/decimal/65398
Japanese:
http://symbolcodes.tlt.psu.edu/bylanguage/japanesechartkatakana.html
Charat code for PHP:
http://eqcode.com/wiki/CharCodeAt
function charCodeAt($str, $num) { return utf8_ord(utf8_charAt($str, $num)); } function utf8_ord($ch) { $len = strlen($ch); if($len <= 0) return false; $h = ord($ch{0}); if ($h <= 0x7F) return $h; if ($h < 0xC2) return false; if ($h <= 0xDF && $len>1) return ($h & 0x1F) << 6 | (ord($ch{1}) & 0x3F); if ($h <= 0xEF && $len>2) return ($h & 0x0F) << 12 | (ord($ch{1}) & 0x3F) << 6 | (ord($ch{2}) & 0x3F); if ($h <= 0xF4 && $len>3) return ($h & 0x0F) << 18 | (ord($ch{1}) & 0x3F) << 12 | (ord($ch{2}) & 0x3F) << 6 | (ord($ch{3}) & 0x3F); return false; } function utf8_charAt($str, $num) { return mb_substr($str, $num, 1, 'UTF-8'); } $str = "A가★あ中"; $code = charCodeAt($str, 2); echo $code; // 9733
charat, php, convert, characters, codethis, url, decoding, decimal, online, verify, querying, databases, http, yehg, encoding, index, meyerweb, dencoder, www, codetable, symbolcodes, tlt, psu, edu, bylanguage, japanesechartkatakana, html, eqcode, wiki, charcodeat, str, num, utf, _ord, _charat, ch, len, strlen, ord, xc, xdf, xef, xf, mb_substr, quot, echo,