this works for me:
Ȥ$ perl -d -e'binmode DB::OUT,":utf8"' Loading DB routines from perl5db.pl version 1.28 Editor support available. Enter h or `h h' for help, or `man perldebug' for more help. main::(-e:1): binmode DB::OUT,":utf8" DB<1> DB<1> s Debugged program terminated. Use q to quit or R to restart, use o inhibit_exit to avoid stopping after program termination, h q, h R or h o to get additional info. DB<1> p "\x{224}"
(I had to put the printed char outside of the code tags because perlmonk's code mangles it otherwise)
update: note that if the binmode() part of the code hasn't (yet) been executed, I get the usual error messages:
Update 2:DB<1> p "\x{224}" Wide character in print at (eval 5)[/usr/local/lib/perl5/5.8.8/perl5db +.pl:628] line 2. at (eval 5)[/usr/local/lib/perl5/5.8.8/perl5db.pl:628] line 2 eval '($@, $!, $^E, $,, $/, $\\, $^W) = @saved;package main; $ +^D = $^D | $DB::db_stop; print {$DB::OUT} "\\x{224}"; ;' called at /usr/local/lib/perl5/5.8.8/perl5db.pl line 628 DB::eval called at /usr/local/lib/perl5/5.8.8/perl5db.pl line +3410 DB::DB called at -e line 1
You should be using binmode DB::OUT,":utf8" instead of binmode $DB::OUT,":utf8"
In reply to Re: Displaying utf8 text in perl -d
by Joost
in thread Displaying utf8 text in perl -d
by lbova
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |