tokuhirom
9/27/2009 - 2:38 PM

unicode-bug.pl

use warnings;
use strict;

{
    package MyText;
    use overload
      q("") => sub { $_[0]->{data} },
      fallback => 1;
}

{
    package main;
    my $text = bless(
        {
            'data' => "\x{3075}",
        },
        'MyText'
    );
    my $x = substr($text, 0, 1);
}
print "ok\n";