Subject Re: [firebird-support] Bug with character sets
Author Kjell Rilbe
Martijn Tonies wrote:

> >>>>1. What does Milan's code know that fbclient doesn't?
> >>>
> >>> Length of string in characters.
> >
> > For CHAR(N) fileds string length in characters is always N, for
> > VARCHAR(N)
>
> Is N stored in the client side struct (SQLDA, or what's it called?) If so,
> why does Milan require the "bytes_per_character", if he decodes the
> string, he can trim to the number of N characters, right?

But the (X)SQLDA does not contain N. It does however contain charset id,
which can be used to obtain "max bytes per char", which can be used in
combination with the buffer size specified in SQLDA to determine N.

Unfortunately, "max bytes per char" requires aquery to a system table,
which fbclient should probably not bother with.

Kjell
--
--------------------------------------
Kjell Rilbe
DataDIA AB
E-post: kjell@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64