Re: A JDBC bug or problem relating to string length in Java

From: Kris Jurka <books(at)ejurka(dot)com>
To: joe user <palehaole(at)yahoo(dot)com>
Cc: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: A JDBC bug or problem relating to string length in Java
Date: 2003-09-02 02:02:08
Message-ID: Pine.LNX.4.33.0309012200250.20453-100000@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Mon, 1 Sep 2003, joe user wrote:

>
> --- Kris Jurka <books(at)ejurka(dot)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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message joe user 2003-09-02 02:03:33 Re: A JDBC bug or problem relating to string length in Java
Previous Message Oliver Jowett 2003-09-02 01:44:15 Re: A JDBC bug or problem relating to string length in Java