Skip Menu |
 

This queue is for tickets about the Encode CPAN distribution.

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

People
Owner: Nobody in particular
Requestors: hatuka [...] nezumi.nu
Cc:
AdminCc:

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



Subject: Encoded results by "HZ" encoder have utf8 flag
Download (untitled) / with headers
text/plain 676b
On Perl 5.10.0 (and maybe higher), encoded results by "HZ" encoder have utf8 flag. There is a test code: ---- >8 ---- >8 ---- >8 ---- >8 ---- >8 ---- >8 ---- use Encode qw(decode encode is_utf8); $b = "START~{4sVGHtS^#,4sGIHgW>~}END"; # "START大智若愚,大巧如拙END" $u = decode("HZ", $b); $r = encode("HZ", $u); print "u", is_utf8($u)? " is ": " is not ", "utf8\n"; print "r", is_utf8($r)? " is ": " is not ", "utf8\n"; ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- On Perl 5.8.5 + Encode 2.12, output is: ------------- u is utf8 r is not utf8 ------------- However, on Perl 5.10.0 + Encode 2.23, output is: ------------- u is utf8 r is utf8 -------------
Download (untitled) / with headers
text/plain 821b
Will be fixed in 2.25. Dan the Maintainer Thereof On Wed Apr 16 10:54:16 2008, NEZUMI wrote: Show quoted text
> On Perl 5.10.0 (and maybe higher), encoded results by "HZ" encoder have > utf8 flag. > > There is a test code: > ---- >8 ---- >8 ---- >8 ---- >8 ---- >8 ---- >8 ---- > use Encode qw(decode encode is_utf8); > $b = "START~{4sVGHtS^#,4sGIHgW>~}END"; # "START大智若愚,大巧如拙END" > > $u = decode("HZ", $b); > $r = encode("HZ", $u); > print "u", is_utf8($u)? " is ": " is not ", "utf8\n"; > print "r", is_utf8($r)? " is ": " is not ", "utf8\n"; > ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- > > On Perl 5.8.5 + Encode 2.12, output is: > ------------- > u is utf8 > r is not utf8 > ------------- > However, on Perl 5.10.0 + Encode 2.23, output is: > ------------- > u is utf8 > r is utf8 > -------------


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

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.