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