Skip Menu |

This queue is for tickets about the Encode CPAN distribution.

Report information
The Basics
Id: 8872
Status: resolved
Priority: 0/
Queue: Encode

People
Owner: Nobody in particular
Requestors: tom [...] jerakeen.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 2.09
Fixed in: (no value)



Subject: behaviour of decode_utf8 does not match documentation
The decode_utf8 function is documented as "equivalent to $string = decode("utf8", $octets [, CHECK])" However, if CHECK is not passed/true, it is in fact equivalent to utf8::decode($copy). (where $copy is a copy of $octets). The main difference here is the behaviour on failure - if $octets is not a valid utf8 encoding, decode("utf8", $octets) will return a string containing question marks, wheras decode_utf8($octets) returns undef. Either the docs should match reality or (better) decode_utf8 should just pass straight through to decode("utf8",..). I'd offer a patch, but this seems trivial. tom
Thanks. addressed in 2.10. Dan the Maintainer Thereof