Data::Dumper vs. UTF-8

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Gentlemen, I need to use
  use utf8; use open qw/:std :encoding(utf8)/;
in my program, but it has the side effect of causing
  print Dumper "龔";
to print
  $VAR1 = "\x";
instead of
  $VAR1 = "龔";
like it would otherwise, and it's driving me nuts. How to adjust this:
use strict;
use warnings FATAL => 'all';
use open qw/:std :encoding(utf8)/;
use utf8;
use Data::Dumper;
print Dumper "龔";

Re: Data::Dumper vs. UTF-8

   at 04:53 AM, said:

Quoted text here. Click to load it

How do you expect anybody to read non-ASCII octets in an ASCII
article? Your header doesn't have, e.g.,

 MIME-Version: 1.0
 Content-Type: text/plain; charset=UTF-8; format=flowed
 Content-Transfer-Encoding: 8bit

One might guess that your E9BE94 is intended to be UTF-8, but why make
people resort to guesses when you want help?

Shmuel (Seymour J.) Metz, SysProg and JOAT  <

Unsolicited bulk E-mail subject to legal action.  I reserve the
right to publicly post or ridicule any abusive E-mail.  Reply to
domain Patriot dot net user shmuel+news to contact me.  Do not
reply to

Site Timeline