Skip to content

Instantly share code, notes, and snippets.

@zby
Created April 17, 2012 09:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zby/2404891 to your computer and use it in GitHub Desktop.
Save zby/2404891 to your computer and use it in GitHub Desktop.
A Data::Dumper bug - or Latin1 strikes again
use strict;
use warnings;
use utf8;
use Devel::Peek;
use Test::More;
use Data::Dumper;
$Data::Dumper::Terse = 1;
#binmode(STDERR, ":utf8");
my $initial = "\x{f3}";
is( $initial, 'ó', 'literal' );
my $dumped = Dumper( $initial );
my $last = eval $dumped;
is( $last, 'ó', 'eval' );
Dump( $last );
done_testing;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment