|
|
| There's more than one way to do things | |
| PerlMonks |
Re^2: utf8 characters in Data::Dumperby tobyink (Prior) |
| on Nov 25, 2012 at 08:14 UTC ( #1005470=note: print w/ replies, xml ) | Need Help?? |
|
This is an interesting workaround. It "works" because it prevents Data::Dumper from seeing the hiragana letter at all. Instead it sees three separate bytes: 0xE3, 0x81, 0x82 and outputs them separately. The terminal then reads those bytes and, assuming it's set to display UTF-8, reassembles them into a single hiragana character. It breaks down if you set $Data::Dumper::Useqq to true.
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||