Re: [perl #17765] UTF-8 in the debugger

2005-07-17 Thread Dave Mitchell
On Tue, Jul 12, 2005 at 04:13:29PM -0700, Michael G Schwern via RT wrote:
  [joemcmahon - Fri Jun 03 15:00:45 2005]:
  
   Same program in the debugger:
   % perl -de '
   $_ = \x{100};
   s/[\x{100}]/o/;
   print $_\n;
   '
   
   Loading DB routines from perl5db.pl version 1.19
   Editor support available.
   
   Enter h or `h h' for help, or `man perldebug' for more help.
   
   main::(-e:2):   $_ = \x{100};
 DB1 c
   Wide character in print at -e line 4.
   ?
  
  This seems to fix the problem; it just adds :utf8 to the debugger's
  output filehandle.
 
 The problem is not the wide character in print warning.  The problem
 is that $_ is not 'o' as it is when run outside the debugger.

Seems to be fixed in 5.8.7 and bleed.

-- 
The Enterprise is captured by a vastly superior alien intelligence which
does not put them on trial.
-- Things That Never Happen in Star Trek #10


[perl #17765] UTF-8 in the debugger

2005-07-17 Thread Michael G Schwern via RT
 [EMAIL PROTECTED] - Sun Jul 17 12:00:05 2005]:
 
  The problem is not the wide character in print warning.  The problem
  is that $_ is not 'o' as it is when run outside the debugger.
 
 Seems to be fixed in 5.8.7 and bleed.

Confirmed and resolved.



[perl #17765] UTF-8 in the debugger

2005-07-12 Thread Michael G Schwern via RT
 [joemcmahon - Fri Jun 03 15:00:45 2005]:
 
  Same program in the debugger:
  % perl -de '
  $_ = \x{100};
  s/[\x{100}]/o/;
  print $_\n;
  '
  
  Loading DB routines from perl5db.pl version 1.19
  Editor support available.
  
  Enter h or `h h' for help, or `man perldebug' for more help.
  
  main::(-e:2):   $_ = \x{100};
DB1 c
  Wide character in print at -e line 4.
  ?
 
 This seems to fix the problem; it just adds :utf8 to the debugger's
 output filehandle.

The problem is not the wide character in print warning.  The problem
is that $_ is not 'o' as it is when run outside the debugger.



Re: [perl #17765] UTF-8 in the debugger

2005-07-12 Thread Joe McMahon


On Jul 12, 2005, at 4:13 PM, Michael G Schwern via RT wrote:


[joemcmahon - Fri Jun 03 15:00:45 2005]:


Same program in the debugger:
% perl -de '
$_ = \x{100};
s/[\x{100}]/o/;
print $_\n;
'

Loading DB routines from perl5db.pl version 1.19
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

main::(-e:2):   $_ = \x{100};
  DB1 c
Wide character in print at -e line 4.
?


This seems to fix the problem; it just adds :utf8 to the debugger's
output filehandle.


The problem is not the wide character in print warning.  The problem
is that $_ is not 'o' as it is when run outside the debugger.

Right, wrong problem solved. :)

 --- Joe M.



Re: [perl #17765] UTF-8 in the debugger

2005-06-14 Thread Rafael Garcia-Suarez
Joe McMahon via RT wrote:
  Same program in the debugger:
  % perl -de '
  $_ = \x{100};
  s/[\x{100}]/o/;
  print $_\n;
  '
  
  Loading DB routines from perl5db.pl version 1.19
  Editor support available.
  
  Enter h or `h h' for help, or `man perldebug' for more help.
  
  main::(-e:2):   $_ = \x{100};
DB1 c
  Wide character in print at -e line 4.
  ?
 
 This seems to fix the problem; it just adds :utf8 to the debugger's
 output filehandle. This is a fix vs. the 5.8.6 debugger source (don't
 have blead installed at the moment). Unable to tell if this is going to
 cause problems for people who actually dump non-Unicode binary to their
 debugger output...

Untested idea: you can use ${^UTF8LOCALE} to see if the user locale supports
utf-8 (works on 5.8.7 and above). Sensible ?


[perl #17765] UTF-8 in the debugger

2005-06-03 Thread Joe McMahon via RT
 Same program in the debugger:
 % perl -de '
 $_ = \x{100};
 s/[\x{100}]/o/;
 print $_\n;
 '
 
 Loading DB routines from perl5db.pl version 1.19
 Editor support available.
 
 Enter h or `h h' for help, or `man perldebug' for more help.
 
 main::(-e:2):   $_ = \x{100};
   DB1 c
 Wide character in print at -e line 4.
 ?

This seems to fix the problem; it just adds :utf8 to the debugger's
output filehandle. This is a fix vs. the 5.8.6 debugger source (don't
have blead installed at the moment). Unable to tell if this is going to
cause problems for people who actually dump non-Unicode binary to their
debugger output...

 --- Joe M.

8
--- /Users/joe/Documents/SD2-Downloads/perl5db.pl   Fri Jun  3
14:48:08 2005
+++ /Users/joe/Documents/perl5db.pl Fri Jun  3 14:44:17 2005
@@ -1725,6 +1725,7 @@
   || open( OUT, $o )
   || open( OUT, STDERR )
   || open( OUT, STDOUT );# so we don't dongle stdout
+ binmode OUT, :utf8;

 } ## end if ($console)
 elsif ( not defined $console ) {
@@ -1735,6 +1736,7 @@
 # merge with STDERR, or with STDOUT.
 open( OUT,  STDERR )
   || open( OUT, STDOUT );# so we don't dongle stdout
+ binmode OUT, :utf8;
 $console = 'STDIN/OUT';
 } ## end elsif (not defined $console)