Re: A JDBC bug or problem relating to string length in Java - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: A JDBC bug or problem relating to string length in Java
Date
Msg-id Pine.LNX.4.33.0309012200250.20453-100000@leary.csoft.net
Whole thread Raw
In response to Re: A JDBC bug or problem relating to string length in Java  (joe user <palehaole@yahoo.com>)
Responses Re: A JDBC bug or problem relating to string length in Java  (joe user <palehaole@yahoo.com>)
List pgsql-jdbc

On Mon, 1 Sep 2003, joe user wrote:

>
> --- Kris Jurka <books@ejurka.com> wrote:
> > Actually varchar(N) in postgresql means the number
> > of characters, not the
> > number of bytes, so you should not have to worry
> > about how it is actually
> > encoded.
>
> I still think there is something else going on here.
> I definitely take all of my input through a truncate
> method which truncates strings to 100 chars, and I
> definitely get a "value too long for type character
> varying(100)" error every once in a while.  The logs
> show the input string to be some kind of multibyte
> string, which I don't know the encoding of.  This is a
> log of the "referrer" header in http requests.  There
> is no specification of encoding of strings in http
> headers, so these strings could be anything.  I have
> tried to take those strings out of the logs and use
> them to make the error happen again but I'm not
> getting it to reduplicate.

You did not mention what your server encoding is.  I assumed it was
unicode, but could you confirm this?

Kris Jurka



pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: A JDBC bug or problem relating to string length in Java
Next
From: joe user
Date:
Subject: Re: A JDBC bug or problem relating to string length in Java