In javascript can use charCodeAt() to get the code number. But i can't find any function to convert it.
eg: ф => ф
yuan wrote:In javascript can use charCodeAt() to get the code number. But i can't find any function to convert it. eg: ф => ф
ord() is what you want. A simple search for "ascii" in the PHP manual would have gotten you the answer.
ord will not work on multibyte characters like that shown above. there isnt a function that i know of that will do this, doesnt mean that one doesnt exist though. i rarely ever work with unicode data.
Thanks, i found the calculation from here http://www.zend.com/codex.php?id=835&single=1