I want to convert <U+xxxx> literals into wide hexadecimal values, how do I do that? Probably trivial, but I don't see it now...
use Encode; use encoding 'utf8'; my $test = "<U+010C>"; $test=~s/\<U\+(.*)\>/\\x\{$1\}/g; print "$test\n"; # prints \x{010C} my $probe1=encode("utf8","\x{010C}"); # works my $probe2=encode("utf8","$test"); # does not work?
In reply to convert scalar to wide hexadecimal value? how? by merlinX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |