Dear specialists,
I need your advice for the following problem:

(see also http://tracker.firebirdsql.org/browse/ODBC-161)

I bound a BLOB SUB_TYPE 1 CHARACHTER SET UTF8 field to SQL_C_WCHAR /
SQL_LONGVARCHAR via SQLBindParameter on an insert operation. Then encountered
problems when using SQLPutData to put in my chardata. Connection charset is
UTF8.

1. I found, that in the IPD the concise type is set to SQL_C_BINARY. Is this
also a good/valid choice for BLOB SUB_TYPE 1, or for this BLOB type wouldn't
it be better to set it to SQL_C_CHAR?

2. The wcstombs and vice versa codepage translation function is setup with a
call to getAdressWcsToMbs / getAdressMbsToWcs which in turn passes
qlda->getSubType( index ) to adressWcsToMbs/adressMbsToWcs. For normal CHAR
or VARCHAR database fields, the subtype contains 3=UNICODE_FSS or 4=UTF8 or
in general I assume the fb charset id. But in the case of BLOB, subtype is
not used to indicate the specified BLOB SUB_TYPE (again, I can't prove but I
assume based on the values found while debugging). So my question is, how, in
case of a BLOB, I can find the fb charset id to use, and then make a link to
the correct codepage conversion function?

All thanks for your help !

--
Joja


------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Firebird-odbc-devel mailing list
Firebird-odbc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-odbc-devel

Reply via email to