win codepages 1253, 1254, 1255, 1257 and cleanup

Lists: pgsql-patches
From: Kris Jurka <books(at)ejurka(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Cc: ataols(at)latnet(dot)lv, kranas(at)freemail(dot)gr
Subject: win codepages 1253, 1254, 1255, 1257 and cleanup
Date: 2006-02-03 11:18:24
Message-ID: Pine.BSO.4.61.0602030559160.25008@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches


The attached patch adds support for windows codepages 1253, 1254, 1255,
and 1257 and cleans up a bunch of the support utilities.

1) In src/backend/utils/mb/Unicode remove nearly duplicate copies of the
UCS_to_XXX perl script and replace with one version to handle all generic
files. Update the Makefile so that it knows about all the map files.
This produces a slight difference in some of the map files, using a
uniform naming convention and not mapping the null character.

2) In src/backend/utils/mb/conversion_procs create a master utf8<->win
codepage function like the iso-8859 versions instead of having a separate
handler for each conversion.

3) There is an externally visible change in the name of the win1258 to
utf8 conversion. According to the documentation notes, it was named
incorrectly and I've changed it to a standard name.
http://www.postgresql.org/docs/8.1/static/functions-string.html#FTN.AEN7664

Running the unicode mapping perl scripts has shown some additional mapping
changes. I've attached these separately. The changes to koi8r and
iso8859-7 look correct to me after checking a few changes against some
code charts, but the euc_jp and sjis changes remove a number of mappings.
I don't know anything about them and wouldn't suggest applying them, but
wanted to pass them along.

Kris Jurka

Attachment Content-Type Size
wincp_mbcleanup.patch text/plain 118.3 KB
utfmaps.patch text/plain 34.2 KB

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-patches(at)postgresql(dot)org
Cc: Kris Jurka <books(at)ejurka(dot)com>, ataols(at)latnet(dot)lv, kranas(at)freemail(dot)gr
Subject: Re: win codepages 1253, 1254, 1255, 1257 and cleanup
Date: 2006-02-18 16:15:41
Message-ID: 200602181715.42744.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Kris Jurka wrote:
> The attached patch adds support for windows codepages 1253, 1254,
> 1255, and 1257 and cleans up a bunch of the support utilities.

I've applied this patch but left out the changes to the Japanese
encoding maps, as you suggested. The CVS logs show that there were
some manual customizations of these mapping files, so it's better to
leave them.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/


From: Kris Jurka <books(at)ejurka(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: win codepages 1253, 1254, 1255, 1257 and cleanup
Date: 2006-02-20 22:58:19
Message-ID: Pine.BSO.4.63.0602201753520.5173@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

On Sat, 18 Feb 2006, Peter Eisentraut wrote:

> Kris Jurka wrote:
>> The attached patch adds support for windows codepages 1253, 1254,
>> 1255, and 1257 and cleans up a bunch of the support utilities.
>
> I've applied this patch but left out the changes to the Japanese
> encoding maps, as you suggested.

The Makefile was invoking perl scripts as ./script.pl. This fails when
the script is not executable as UCS_to_most.pl is in CVS. It also won't
pick up any custom setting of the perl version/location to use. This
patch calls perl scripts like $(PERL) $(srcdir)/script.pl.

Kris Jurka

Attachment Content-Type Size
mb_map_call_perl.patch text/plain 1.8 KB

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: win codepages 1253, 1254, 1255, 1257 and cleanup
Date: 2006-02-24 13:26:34
Message-ID: 200602241426.36397.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Am Montag, 20. Februar 2006 23:58 schrieb Kris Jurka:
> The Makefile was invoking perl scripts as ./script.pl. This fails when
> the script is not executable as UCS_to_most.pl is in CVS. It also won't
> pick up any custom setting of the perl version/location to use. This
> patch calls perl scripts like $(PERL) $(srcdir)/script.pl.

Fixed.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/