I wasn't too happy with the second snippet. It had no way of escaping \. This is a fix:
my $out = ''; for ($in) { /\G ([^\\]+) /xgc && ( $out .= $1 ); /\G \\u([0-9A-Fa-f]{4})/xgc && do { $out .= chr(hex($1)); redo; }; /\G \\(.) /xgc && do { $out .= $1; redo; }; }
In reply to Re^2: How to to get chinese charactor from unicode?
by ikegami
in thread How to to get chinese charactor from unicode?
by snaillu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |