On Sunday, April 14, 2002, at 05:15 , Jarkko Hietaniemi wrote:
>> Should we mention piconv? Or this:
>
> piconv is good...
It's going to be better on 1.35 -- I have noticed piconv can't use
encodings that are added AFTER perl or Encode is installed (because of
Encode::Config does not tweak %ExtModule any further). But for the time
being....
> ==== //depot/perl/ext/Encode/encoding.pm#3 (text) ====
> Index: perl/ext/Encode/encoding.pm
> --- perl/ext/Encode/encoding.pm.~1~ Sat Apr 13 23:14:14 2002
> +++ perl/ext/Encode/encoding.pm Sat Apr 13 23:14:14 2002
> @@ -2,6 +2,7 @@
> our $VERSION = do { my @r = (q$Revision: 1.25 $ =~ /\d+/g); sprintf
> "%d."."%02d" x $#r, @r };
>
> use Encode;
> +use strict;
>
> BEGIN {
> if (ord("A") == 193) {
> @@ -28,9 +29,9 @@
> if ($arg{$h}){
> unless (defined find_encoding($name)) {
> require Carp;
> - Carp::croak "Unknown encoding for $fhname, '$arg{$h}'";
> + Carp::croak "Unknown encoding for $h, '$arg{$h}'";
> }
> - eval qq{ binmode($h, ":encoding($arg{h})") };
> + eval qq{ binmode($h, ":encoding($arg{$h})") };
> }else{
> eval qq{ binmode($h, ":encoding($name)") };
> }
> End of Patch.
Applied to my repo. Kiitos. Gosh, what a shame to overlook the missing
"use strict".
Dan the Encode Maintainer