Subject Re: [firebird-support] Bug with character sets
Author Dimitry Sibiryakov
>> It is "glue", right, but network protocol does not include actual
>> data length in characters, only in bytes.
>
> Then what does it transfer? The server know how many characters
> there are, doesn't it?

No, server also has no clue about number of characters. Server works
with binary buffers only. No general difference between BIGINT and
VARCHAR(4).

> How does this work for VARCHAR?
>
> Why is the CHAR buffer padded, but it seems VARCHAR isn't?

Exactly because of that: CHAR _is_ padded, but VARCHAR is put into
user buffer as is.
As I already said - CHAR is transferred trimmed and is padded with
spaces on receiving side. VARCHAR is transferred with it's actual length.

SY, SD.