develooper Front page | perl.perl5.porters | Postings from January 2012

Re: utf8 inconsistency in 5.15.7

Thread Previous | Thread Next
From:
Father Chrysostomos
Date:
January 22, 2012 12:17
Subject:
Re: utf8 inconsistency in 5.15.7
Message ID:
63BCA4E1-EDCA-457F-BE9C-033F94943CA7@cpan.org
rjbs asked:
> Father Chrysostomos, what happened here?  Clearly there's more stuff in the
> commit than seems related to the message.  Should it have gone in later?  > Maybe not at all?

I combined two commits by mistake.  The change to utf8::decode was a fix for bug #91850.  utf8::decode($object_with_string_overloading) was not working, so I fixed that by coercing the argument to a string.  It didn’t occur to me that it affected undef as well, but I would consider that a bug fix, too.  There is no reason these should be inconsistent:

$ perl5.14.2 -MData::Dumper -e '$x = undef; utf8::decode($x); print Dumper $x'
$VAR1 = undef;
$ perl5.14.2 -MData::Dumper -e '$x = undef; utf8::encode($x); print Dumper $x'
$VAR1 = '';


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About