Re: 7.3.1 UTF-8 bug(?) and 7.2.x Charset compatibility - Mailing list pgsql-jdbc

From Dave Cramer
Subject Re: 7.3.1 UTF-8 bug(?) and 7.2.x Charset compatibility
Date
Msg-id 1044620399.1058.55.camel@inspiron.cramers
Whole thread Raw
In response to Re: 7.3.1 UTF-8 bug(?) and 7.2.x Charset compatibility  (Achilleus Mantzios <achill@matrix.gatewaynet.com>)
Responses emacs behave like pgjindent?
List pgsql-jdbc
This doesn't really solve the problem. The driver isn't the only way to
get information into the database. The driver should be able to handle
anything that it receives gracefully though

Dave
On Fri, 2003-02-07 at 06:56, Achilleus Mantzios wrote:
> On Wed, 5 Feb 2003, Barry Lind wrote:
>
> >
> >
> > Achilleus Mantzios wrote:
> > > b) NOT GREEK RELATED!
> > >  With database_encoding set to SQL_ASCII, the server converts these wierd
> > >  2 chars (0xA0 0x0A) to UTF-8, and then the driver simply fails.
> > >
> > > I think you should deal with problem b).
> > > To create a test case is easy.
> > > Create a SQL_ASCII database, then insert these 2 chars in a text column
> > > (having typed these two chars with some utility like khexedit),
> > > and then out.println this string.
> > >
> >
> > Achilleus,
> >
> > I want to understand what you mean by 'deal with the problem'.  Since
>
> What i mean, is simply that either we dont allow these chars
> to get inserted (setString methods maybe), and we let the
> decodeUTF-8 method as is, or allow them to get inserted
> and then convert them to the traditional '?' char.
>
> Thanx
>
> > 0xA0 and 0x0A are invalid SQL_ASCII characters, the only thing I can
> > think of is to produce a better exception in this case.  So instead of
> > the current ArrayIndexOutOfBounds exception, this case would throw a SQL
> > Exception with a message something like:  "Invalid characters were
> > found.  This is most likely caused by stored data containing characters
> > that are invalid for the character set the database was created in.  The
> > most common example of this is storing 8bit data in a SQL_ASCII database."
> >
> > thanks,
> > --Barry
> >
> >
> >
>
> ==================================================================
> Achilleus Mantzios
> S/W Engineer
> IT dept
> Dynacom Tankers Mngmt
> Nikis 4, Glyfada
> Athens 16610
> Greece
> tel:    +30-10-8981112
> fax:    +30-10-8981877
> email:  achill@matrix.gatewaynet.com
>         mantzios@softlab.ece.ntua.gr
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
--
Dave Cramer <Dave@micro-automation.net>


pgsql-jdbc by date:

Previous
From: Achilleus Mantzios
Date:
Subject: Re: 7.3.1 UTF-8 bug(?) and 7.2.x Charset compatibility
Next
From: Daniel Serodio
Date:
Subject: Re: Type of variable in poststoneware exists algun, that