in reply to How to to get chinese charactor from unicode?
$s = '\u805a\u5408\u6216\u8be6\u7ec6'; $s =~ s/u(\w\w\w\w)/x{$1}/g; $s = eval qq{"$s"}; print($s);
Alternatively, you could interpret the original string yourself
$s = '\u805a\u5408\u6216\u8be6\u7ec6'; $s =~ s/\\u([0-9A-Fa-f]{4})/chr(hex($1))/ge; print($s);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to to get chinese charactor from unicode?
by ikegami (Patriarch) on Mar 02, 2007 at 06:57 UTC |