Re: Radix tree for character conversion

Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>

From: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
To: michael.paquier@gmail.com
Cc: ayumi.ishii.pg@gmail.com, hlinnaka@iki.fi, daniel@yesql.se, peter.eisentraut@2ndquadrant.com, robertmhaas@gmail.com, tsunakawa.takay@jp.fujitsu.com, tgl@sss.pgh.pa.us, ishii@sraoss.co.jp, pgsql-hackers@postgresql.org
Date: 2017-01-26T12:17:37Z
Lists: pgsql-hackers
At Thu, 26 Jan 2017 16:29:10 +0900, Michael Paquier <michael.paquier@gmail.com> wrote in <CAB7nPqQd860tOC17O3Qs3+dzZTYbXrXxVD9Tfph0pJ9LAYZ=Ww@mail.gmail.com>
> On Wed, Jan 25, 2017 at 7:18 PM, Ishii Ayumi <ayumi.ishii.pg@gmail.com> wrote:
> > I patched 4 patchset and run "make", but I got failed.
> > Is this a bug or my mistake ?
> > I'm sorry if I'm wrong.
> >
> > [$(TOP)]$ patch -p1 < ../0001-Add-missing-semicolon.patch
> > [$(TOP)]$ patch -p1 < ../0002-Correct-reference-resolution-syntax.patch
> > [$(TOP)]$ patch -p1 <
> > ../0003-Apply-pgperltidy-on-src-backend-utils-mb-Unicode.patch
> > [$(TOP)]$ patch -p1 < ../0004-Use-radix-tree-for-character-conversion.patch
> > [$(TOP)]$ ./configure
> > [Unicode]$ make
> > '/usr/bin/perl' UCS_to_most.pl
> > Type of arg 1 to keys must be hash (not hash element) at convutils.pm
> > line 443, near "})
> >         "
> > Type of arg 1 to values must be hash (not hash element) at
> > convutils.pm line 596, near "})
> >         "
> > Type of arg 1 to each must be hash (not private variable) at
> > convutils.pm line 755, near "$map)
> >         "
> > Compilation failed in require at UCS_to_most.pl line 19.
> > make: *** [iso8859_2_to_utf8.map] Error 255
> 
> Hm, I am not sure what you are missing. I was able to get things to build.

As I posted, it should be caused by older perl, at least 5.8
complains so and 5.16 doesn't.

regards,

-- 
Kyotaro Horiguchi
NTT Open Source Software Center




Commits

  1. Use radix tree for character encoding conversions.

  2. Small fixes to the Perl scripts to create unicode conversion tables.

  3. Rewrite the perl scripts to produce our Unicode conversion tables.

  4. Remove leading zeros, for consistency with other map files.

  5. Remove code points < 0x80 from character conversion tables.