in reply to Padre: how to view/examine Unicode strings in the debugger?

If you print them, wouldn't they will be printed to the output pane? And isn't the output pane unicode aware? There you go :)

  • Comment on Re: Padre: how to view/examine Unicode strings in the debugger?

Replies are listed 'Best First'.
Re^2: Padre: how to view/examine Unicode strings in the debugger?
by HelenCr (Monk) on Feb 25, 2012 at 02:07 UTC
    It's not convenient to debug by printing. The whole advantage of a debugger is, that you can inspect variables while stepping through the program.

      It's not convenient to debug by printing. The whole advantage of a debugger is, that you can inspect variables while stepping through the program.

      hello, you can print from the debugger, esp if you don't like the default Dumper style output

      you can also improve the debugger to your liking

      I think the aim of the response you got, was to isolate where the problem lays.

      Cheers Rolf

        I figured it out, its three bugs here on win32

        #!/usr/bin/perl -- use utf8; binmode STDOUT, ':encoding(UTF-8)'; binmode $DB::OUT, ':encoding(UTF-8)' if $DB::OUT; our $junk = "\x{5ff}\x{5ff} \x{25c4} \x{2663} \x{2665} \x{2663} \x{25b +a} \x{5ff}\x{5ff}"; $junk .= "$junk\n"; print $junk;

        $junk .= "׿׿ ◄ ♣ ♥ ♣ ► ׿׿\n";

        the padre output pane, doesn't show any output when you run (or debug) the file you're editing

        If you binmode STDOUT, that still leaves $DB::OUT to get binmoded (bug in debugger)

        The "Debug Output" pane is not unicode aware, or the filehandle its reading from hasn't been binmoded to decode utf8, so what gets displayed correctly in the editor pane (the heart, clovers, and triangles above) doesn't in the "Debug Output" pane

        Oh, and when pasting/posting to perlmonks with firefox, firefox flips the triangles around, they were originally like this

        $junk .= "׿׿ ► ♣ ♥ ♣ ◄ ׿׿\n";