Skip Menu |

This queue is for tickets about the Encode CPAN distribution.

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

Owner: Nobody in particular
Requestors: tom [...]

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

Subject: behaviour of decode_utf8 does not match documentation
Download (untitled) / with headers
text/plain 606b
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

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to