Subject | Re: [firebird-support] Right-padded char fields? |
---|---|
Author | Olivier Mascia |
Post date | 2008-09-03T20:32:16Z |
Le 02-sept.-08 à 20:21, Adriano dos Santos Fernandes a écrit :
Okay for UTF8 specific case, I'll go the self decoding way to measure
the real data length. And some day the API will get more complete.
By the way, please tell me that a UTF8 VARCHAR occupies only its
actual data-length (plus length info) and not actual character-length
x 4 in the database records themselves???
Yours,
--
Olivier Mascia
T.I.P. Group S.A.
http://www.tipgroup.com
>> or you can let FB return that length using VARCHAR formatOh. Sad news.
>> by single line of code which chages
>>
>> xsqlda^.sqlvar[col].sqltype := ...
>>
> AFAIR, this doesn't work at least for output buffers. You will have a
> "message length error". And AFAIK, it can't work correctly for
> CHAR->VARCHAR, because regardless of user supplied types, the data
> will
> be sent to the client on the originally described type, so the client
> can't correctly do it.
Okay for UTF8 specific case, I'll go the self decoding way to measure
the real data length. And some day the API will get more complete.
By the way, please tell me that a UTF8 VARCHAR occupies only its
actual data-length (plus length info) and not actual character-length
x 4 in the database records themselves???
Yours,
--
Olivier Mascia
T.I.P. Group S.A.
http://www.tipgroup.com