tags:

views:

21

answers:

1

How do you go about converting things like 'U+3421' to '你'? Using PHP.

A: 

I've found a solution for anyone who may also need to know how to do this.

I implemented the phputf8 library, http://sourceforge.net/projects/phputf8/

I used the utf8_from_unicode function in utf8/utils/unicode.php

<?php
    // Example
    require_once 'utf8/utils/unicode.php';
    $key = 'U+3421';
    echo utf8_from_unicode(array(hexdec(substr($key,2))));
?>
Jerry