snaillu has asked for the wisdom of the Perl Monks concerning the following question:
use Encode; $vall = '\u805a\u5408\u6216\u8be6\u7ec6'; $vall =~ s/u(\w\w\w\w)/x{$1}/g; print $vall,"\n"; $str=Encode::encode("utf8", $vall); print $str;
The result is:
\x{805a}\x{5408}\x{6216}\x{8be6}\x{7ec6} \x{805a}\x{5408}\x{6216}\x{8be6}\x{7ec6}
In fact, I want to get the result like below:
\x{805a}\x{5408}\x{6216}\x{8be6}\x{7ec6} ¾ÛºÏ»òÏêϸ
To the sum, I want to get chinese charactor from unicode.
Edit: g0n - code tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to to get chinese charactor from unicode?
by ikegami (Patriarch) on Mar 02, 2007 at 06:16 UTC | |
by ikegami (Patriarch) on Mar 02, 2007 at 06:57 UTC | |
|
Re: How to to get chinese charactor from unicode?
by zentara (Cardinal) on Mar 02, 2007 at 13:43 UTC |