in reply to Re^2: unicode/utf string to actual character
in thread unicode/utf string to actual character

use open ':std', ':locale'; # So stuff you print shows up right. $_ = "\\u6b63"; print "orig string length is ", length($_), "\n"; print "orig string is $_\n"; s/\\u(.{4})/chr(hex($1))/eg; print "decoded string length is ", length($_), "\n"; print "decoded string is $_\n";
orig string length is 6
orig string is \u6b63
decoded string length is 1
decoded string is 正

Update: Added lots