Re: encoding names - Mailing list pgsql-patches

From Barry Lind
Subject Re: encoding names
Date
Msg-id 3B7D564E.5030201@xythos.com
Whole thread Raw
In response to encoding names  (Karel Zak <zakkr@zf.jcu.cz>)
Responses Re: encoding names
Re: encoding names
List pgsql-patches
This patch will break the JDBC driver.  The jdbc driver relies on the
value returned by getdatabaseencoding() to determine the server encoding
so that it can convert to unicode.  This patch changes the return values
for getdatabaseencoding() such that the driver will no longer work.  For
example "LATIN1" which used to be returned will now come back as
"iso88591".  This change in behaviour impacts the JDBC driver and any
other application that is depending on the output of the
getdatabaseencoding() function.

I would recommend that getdatabaseencoding() return the old names for
backword compatibility and then deprecate this function to be removed in
the future.  Then create a new function that returns the new encoding
names that can be used going forward.

thanks,
--Barry

Karel Zak wrote:
>  Hi,
>
>  attached is patch with:
>
> - new encoding names stuff with better performance (binary search
>   intead for() and prevent some needless searching)
>
> - possible is use synonyms for encoding (an example ISO-8859-1,
>   Latin1, l1)
>
> - implemented is Peter's idea about "encoding names clearing"
>   (other chars than [A-Za-z0-9] are irrelevan -- 'ISO-8859-1' is
>   same as 'iso8859_1' or iso-8-8-5-9-1 :-)
>
> - share routines for this between FE and BE (never more define
>   encoding names separate in FE and BE)
>
> - add prefix PG_ to encoding identificator macros, something like 'ALT'
>   is pretty dirty in source code, rather use PG_ALT.
>
>  (Note: patch add new file mb/encname.c and remove mb/common.c)
>
>                 Karel
>
>
>
> ------------------------------------------------------------------------
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>
> Part 1.1
>
> Content-Type:
>
> text/plain
>
>
> ------------------------------------------------------------------------
> mb-08172001.patch.gz
>
> Content-Type:
>
> application/x-gzip
> Content-Encoding:
>
> base64
>
>
> ------------------------------------------------------------------------
> Part 1.3
>
> Content-Type:
>
> text/plain
> Content-Encoding:
>
> binary
>
>



pgsql-patches by date:

Previous
From: Mikhail Terekhov
Date:
Subject: Re: [HACKERS] Re: WIN32 errno patch
Next
From: Liam Stewart
Date:
Subject: DatabaseMetaData patch