Обсуждение: A bug in UCS_to_most.pl

Поиск
Список
Период
Сортировка

A bug in UCS_to_most.pl

От
Kyotaro HORIGUCHI
Дата:
Hello,

I was surprised to find that
src/backend/utils/mb/Unicode/Makefile got changed (3a47c70) to
have download feature of character conversion authority files. It
seems fine according to the previous discussion as the commnet of
that is saying.

So, I did 'make maintainer-clean; make' on it but got the
following error.

> Hash %filename missing the % in argument 1 of keys() at UCS_to_most.pl line 51.'/usr/bin/perl' UCS_to_most.pl

What is more surprising to find that it is there since
2006. Maybe Heikki unintentionally fixed that in the patch in the
thread, or older perls might not have complained about it (my
perl is 5.16).

Anyway, the attached small patch fixes it.

regards,

-- 
Kyotaro Horiguchi
NTT Open Source Software Center
diff --git a/src/backend/utils/mb/Unicode/UCS_to_most.pl b/src/backend/utils/mb/Unicode/UCS_to_most.pl
index d7ec8ef..125378f 100755
--- a/src/backend/utils/mb/Unicode/UCS_to_most.pl
+++ b/src/backend/utils/mb/Unicode/UCS_to_most.pl
@@ -48,7 +48,7 @@ require "ucs2utf.pl";    'UHC'        => 'CP949.TXT',    'JOHAB'      => 'JOHAB.TXT',);
-@charsets = keys(filename);
+@charsets = keys(%filename);@charsets = @ARGV if scalar(@ARGV);foreach $charset (@charsets){

Re: A bug in UCS_to_most.pl

От
Robert Haas
Дата:
On Tue, Nov 8, 2016 at 3:56 AM, Kyotaro HORIGUCHI
<horiguchi.kyotaro@lab.ntt.co.jp> wrote:
> I was surprised to find that
> src/backend/utils/mb/Unicode/Makefile got changed (3a47c70) to
> have download feature of character conversion authority files. It
> seems fine according to the previous discussion as the commnet of
> that is saying.
>
> So, I did 'make maintainer-clean; make' on it but got the
> following error.
>
>> Hash %filename missing the % in argument 1 of keys() at UCS_to_most.pl line 51.'/usr/bin/perl' UCS_to_most.pl
>
> What is more surprising to find that it is there since
> 2006. Maybe Heikki unintentionally fixed that in the patch in the
> thread, or older perls might not have complained about it (my
> perl is 5.16).
>
> Anyway, the attached small patch fixes it.

It's quite amazing to me that that ever worked for anyone.  Committed.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



Re: A bug in UCS_to_most.pl

От
Kyotaro HORIGUCHI
Дата:
At Tue, 15 Nov 2016 09:44:54 -0500, Robert Haas <robertmhaas@gmail.com> wrote in
<CA+Tgmoaqtq8u89PwmxyrRhr8oKy4Hz5S+bTzqZ=0n=XxU9bYiA@mail.gmail.com>
> On Tue, Nov 8, 2016 at 3:56 AM, Kyotaro HORIGUCHI
> <horiguchi.kyotaro@lab.ntt.co.jp> wrote:
> > I was surprised to find that
> > src/backend/utils/mb/Unicode/Makefile got changed (3a47c70) to
> > have download feature of character conversion authority files. It
> > seems fine according to the previous discussion as the commnet of
> > that is saying.
> >
> > So, I did 'make maintainer-clean; make' on it but got the
> > following error.
> >
> >> Hash %filename missing the % in argument 1 of keys() at UCS_to_most.pl line 51.'/usr/bin/perl' UCS_to_most.pl
> >
> > What is more surprising to find that it is there since
> > 2006. Maybe Heikki unintentionally fixed that in the patch in the
> > thread, or older perls might not have complained about it (my
> > perl is 5.16).
> >
> > Anyway, the attached small patch fixes it.
> 
> It's quite amazing to me that that ever worked for anyone.  Committed.

Thanks.

As for myself, Probably I have never ran UCS_to_most.pl. Maybe no
one ran it since the patch.

regards,

-- 
Kyotaro Horiguchi
NTT Open Source Software Center