UseUnicode always creates ftWideString fields?
UseUnicode always creates ftWideString fields?
Hi,
In my application, I need to be able to distinguish between ftString and ftWideString.
I'm exporting data to other DBMSses and for unicode string data, this data gets prefixed with N' ', but it seems that always ftWideString is used as the datatype, even though the column in Firebird is defined as VARCHAR with NO Unicode characterset.
Got any ideas how to do this?
In my application, I need to be able to distinguish between ftString and ftWideString.
I'm exporting data to other DBMSses and for unicode string data, this data gets prefixed with N' ', but it seems that always ftWideString is used as the datatype, even though the column in Firebird is defined as VARCHAR with NO Unicode characterset.
Got any ideas how to do this?
The connection characterset is ISO8859_1, I'm using Delphi 2009, so I have no idea why a resultset with VARCHAR is returned as TWideStringField.Plash wrote:InterBase returns all fields in UTF8 when the connection character set is UTF8.
Use the information from the metadata tables like RDB$FIELDS to get fields character set.
In a resultset, the characterset ID is returned in the SQLVAR.
This should be TStringField.
This is the sense of the UseUnicode option that Unicode character set is used for the connection. You can connect to a database with any character set when the UNICODE_FSS character set is used for the connection.
Encoding of TStringField depends on Windows regional settings. So there is no sense in using TStringField for any specific InterBase character set. TWideStringField can be used for Unicode and any national character set.
Encoding of TStringField depends on Windows regional settings. So there is no sense in using TStringField for any specific InterBase character set. TWideStringField can be used for Unicode and any national character set.