Subject RE: [firebird-support] varchar(2048) holds 1012
Author Alan McDonald
> Alan,
> This isn't correct. A varchar(2048) will store 2048 characters of its
> defined character set, regardless. If character set is NONE, the column
> will be 2050 bytes wide (varchar has two bytes reserved for length). If,
> for example, the input is UNICODE_FSS, then the column would need to be
> 6146 bytes wide to store 2048 UNICODE_FSS characters, but it
> would still be
> varchar(2048).
> An overflow (i.e. string truncation) could occur if the input was coming
> through as "too many" multi-byte characters for storage into a cs NONE
> column, i.e. more than 2048 bytes That still doesn't account for the
> arithmetic exception indicated by the sqlcode.
> /heLen

Thanks for that