Skip Menu |
 

This queue is for tickets about the Encode CPAN distribution.

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

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.18
Fixed in: (no value)



Subject: piconv: wrong conversion of utf-16le encoded files (with PATCH)
Download (untitled) / with headers
text/plain 640b
This seems to be a duplicate of bug #7831, but it also occurs on non-Win32 systems (i.e. Linux 2.4). There are two problems: * The default conversion schemes assume $/ as line separator. This is not true for utf-16 (and probably other multibyte encodings like ucs-4); here a newline is two bytes. The perlio conversion scheme does not suffer from this problem. * Unfortunately it's not possible to switch the conversion scheme with -scheme perlio because of a upper/lower typo in the source. I suggest to change the default conversion scheme to perlio, and the above mentioned bug is also solved in the attached patch. Regards, Slaven
Subject: piconv.patch
Download piconv.patch
text/x-diff 665b
--- bin/piconv.orig 2006-07-07 16:28:12.000000000 +0200 +++ bin/piconv 2006-07-07 16:28:26.000000000 +0200 @@ -40,7 +40,7 @@ $Opt{from} || $Opt{to} || help(); my $from = $Opt{from} || $locale or help("from_encoding unspecified"); my $to = $Opt{to} || $locale or help("to_encoding unspecified"); $Opt{string} and Encode::from_to($Opt{string}, $from, $to) and print $Opt{string} and exit; -my $scheme = exists $Scheme{$Opt{Scheme}} ? $Opt{Scheme} : 'from_to'; +my $scheme = exists $Scheme{$Opt{scheme}} ? $Opt{scheme} : 'perlio'; $Opt{check} ||= $Opt{c}; $Opt{perlqq} and $Opt{check} = Encode::PERLQQ; $Opt{htmlcref} and $Opt{check} = Encode::HTMLCREF;
Download (untitled) / with headers
text/plain 950b
Slaven, First my apology for not being responsive. I've tried your patch but that makes -C and -p corrupt because perlio sets extra fallbacks. Instead I mentioned in POD. Upper/Lower Typo is fixed, however. Dan the Maintainer Thereof On Fri Jul 07 10:35:46 2006, SREZIC wrote: Show quoted text
> This seems to be a duplicate of bug #7831, but it also occurs on > non-Win32 systems (i.e. Linux 2.4). There are two problems: > * The default conversion schemes assume $/ as line separator. This is > not true for utf-16 (and probably other multibyte encodings like ucs-4); > here a newline is two bytes. The perlio conversion scheme does not > suffer from this problem. > * Unfortunately it's not possible to switch the conversion scheme with > -scheme perlio because of a upper/lower typo in the source. > I suggest to change the default conversion scheme to perlio, and the > above mentioned bug is also solved in the attached patch. > > Regards, > Slaven


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.