Skip site navigation (1) Skip section navigation (2)

Re: encoding names

From: Barry Lind <barry(at)xythos(dot)com>
To: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
Cc: pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: encoding names
Date: 2001-08-17 17:37:18
Message-ID: 3B7D564E.5030201@xythos.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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(at)postgresql(dot)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
> 
> 



In response to

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2001-08-17 17:46:27
Subject: Re: Dollar in identifiers
Previous:From: Bruce MomjianDate: 2001-08-17 17:34:32
Subject: Re: Re: [JDBC] JDBC pg_description update needed for CVS tip

pgsql-patches by date

Next:From: Mikhail TerekhovDate: 2001-08-17 18:51:59
Subject: Re: [HACKERS] Re: WIN32 errno patch
Previous:From: Bruce MomjianDate: 2001-08-17 17:34:32
Subject: Re: Re: [JDBC] JDBC pg_description update needed for CVS tip

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group