Thread: win codepages 1253, 1254, 1255, 1257 and cleanup

win codepages 1253, 1254, 1255, 1257 and cleanup

From
Kris Jurka
Date:
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

Re: win codepages 1253, 1254, 1255, 1257 and cleanup

From
Peter Eisentraut
Date:
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/

Re: win codepages 1253, 1254, 1255, 1257 and cleanup

From
Kris Jurka
Date:

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

Re: win codepages 1253, 1254, 1255, 1257 and cleanup

From
Peter Eisentraut
Date:
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/