Subject | Re: Approaches at JB-to-FB conenctions regarding charsets |
---|---|
Author | the_a_rioch |
Post date | 2012-07-03T10:42:32Z |
> None of your suggestions will work with heterogenous environment. EvenWill they?
> if Jaybird defaults to UTF8, all Delphi apps will default to NONE,
DB Express, EMB provides for last years, already uses Unicode, even before Delphi switched to it (they used COM BSTR as main type in pre-Unicode Delphi).
Even then in conenction setup GUI there as field to specify charset, probably for table names.
http://www.danielmagin.de/blogimages/tib/8.png
I think same would go for 3rd party DBX providers for IB/FB as well.
same for Borland .Net Data Provider
http://www.compress.ru/Archive/CP/2004/6/13/fig10.jpg
Also, DBX would have a published property for that
http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/delphivclwin32/SqlExpr_TSQLConnection_LocaleCode.html
BDE is outdated and not to be described.
ADO and OLE DB provider would probably work via UTF-16 COM BSTR again
Interbase Express has the charset explicit, so probably good programmer would set it
http://studmaster.ru/st/delphi/delphi7secr/chapter18/pic1.gif
Unified Interbase has published property CharacterSet
FIB+ makes it a 1st class citizen by
TConnectParams = class(TPersistent)
property UserName: string;
property RoleName: string;
property Password: string;
property CharSet : string;
end;
IBObjects has in TIB_Connection the property CharSet: string;
So... in native Delphi that was accounted for for a while.
----
> theyThey would not have to.
> won't be able to read that UTF-8 characters.
Server would convert them to 1251 or anything. If possible, of course.
> The only solution is to ditch the NONE completely, leaving it forWhy not.
> backward compatibility only.
NONE is not supposed to work in heterogeneous environment, until every app would make peer-to-peer support tricks.