Tue Jun 17 09:56:16 2008: Request 36817 was acted upon. Transaction: Ticket created by CDOT Queue: CGI.pm Subject: Incomplete documentation of CGI::charset Broken in: 3.29 Severity: Normal Owner: Nobody Requestors: cpan@c-dot.co.uk Status: new Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=36817 > Trap for the unwary. When CGI::charset is called from a query object (e.g. $query->charset) then there is an undocumented side effect; the encoding of text parameters changes. For example, if you do this: use CGI; my $query = new CGI({ text => [ Encode::encode_utf8(chr(8192)) ]}); CGI::charset('utf-8'); print $query->param('text'); then you will get a UTF8-encoded byte string printed. If however you call $query->charset('utf-8'); instead of CGI::charset you will get a unicode string instead, resulting in a 'Wide character in print' error. This behaviour is acceptable, but needs to be documented in the man page.