in reply to Data Dumper utf8 utf-8 unicode

I think that behavior is hardcoded/not configurable, but you could try some ugly hack like this (i.e. redefine the qquote routine):

use Data::Dumper; $Data::Dumper::Useqq = 1; { no warnings 'redefine'; sub Data::Dumper::qquote { my $s = shift; return "'$s'"; } } my $str = "abc \x{539f}\x{4f86} xyz"; binmode STDOUT, ':encoding(UTF-8)'; print Dumper $str;

Output:
$VAR1 = 'abc 原來 xyz';

(untested for side-effects!)

And if that's for more than just dumping stuff to look at, in other words, if you want to be able to eval the output as would normally be possible, you'd at least have to take care of properly quoting any single quotes and backslashes within those single quoted strings...