Page 1 of 2
UseUnicode = True connects with wrong charset
Posted: Wed 10 Nov 2010 15:46
by rdollinger
Hi,
I have a DB in UTF8 and I would connect to this DB with charset UTF8. Bu I have noted in the MON$ATTACHMENTS table that, when UseUnicode is True the connection to the DB is UNICODE_FSS, when UseUnicode is False then the connection to the DB is UTF8. But in both cases it should be UTF8 when I set the charset to UTF8.
IBCConnection1.Options.charset := 'UTF8';
What's going wrong here?
Thanks for your help in advanced
bye
Robert
IBDAC 3.10.0.16
Delphi 2009
Posted: Thu 11 Nov 2010 09:45
by AndreyZ
Hello,
This is a standard IBDAC behaviour. When the UseUnicode property is set to True, IBDAC uses the Unicode_FSS character set to work with string data. For more information please read the "Working with Unicode Character Data" topic of IBDAC Reference Manual.
Posted: Fri 12 Nov 2010 08:25
by rdollinger
Are there any plans to use UTF8 instead of UNICODE_FSS, because UNICODE_FSS is deprecated?
bye
Robert
UNICODE_FSS:
Unicode UTF-8. An old implementation that accepts malformed strings and does not enforce correct max. string length. All characters 3 bytes, no case mapping.
Superseded in Firebird 2.0 with the UTF8 character set. Deprecated.
Posted: Fri 12 Nov 2010 08:41
by AndreyZ
We will investigate the possibility of using UTF-8 instead of the UNICODE_FSS character set in the future. As soon as we solve this question we will let you know.
Posted: Thu 09 Dec 2010 15:40
by Dimon
New build of IBDAC version 3.50.0.19 is available for download now. Now the UTF8 charset is used instead of UNICODE_FSS, when TIBCConnectionOptions.UseUnicode is True and Charset is set to 'UTF8'.
Posted: Fri 10 Dec 2010 15:45
by mhelmstedt
With new version (3.50.0.19), an access violation occurs when opening the connection with the UseUnicode option checked.
Had to change back to 3.50.0.18 immediately.
Please fix!
Posted: Mon 13 Dec 2010 09:06
by AndreyZ
I cannot reproduce the problem. Please make sure that you don't have any old dcu files and links to the old sources.
Posted: Wed 15 Dec 2010 14:55
by Fabrice
Hello,
When I set UseUnicode to true with an UTF8 database on Delphi 2010 pro.
I have access violation too in Devexpress (cxBDData.pas) :
Code: Select all
function TcxValueDefDBReader.GetValue(AValueDef: TcxValueDef): Variant;
var
AField: TField;
begin
AField := TcxDBDataField(AValueDef.LinkObject).Field;
if Assigned(AField) then
Result := GetFieldValue(AField) // <- AV here
else
Result := inherited GetValue(AValueDef);
end;
Without problem in previous version. All old .dcu has been removed.
You can test with the samples I have sent for
this Thread
Posted: Thu 16 Dec 2010 10:49
by AndreyZ
I cannot reproduce the problem. I have used your sample but the error didn't occur. Please send me a script to create and fill a table which causes the problem to andreyz*devart*com.
Posted: Thu 16 Dec 2010 20:43
by mhelmstedt
Reinstalled again, removed all dcu files, but the access violation remains.
During design time, the whole IDE crashes.
Using charset Unicode_fss avoids the access violation, but changing the charset is not what I want.
It's interesting that some tables can be opened, other's not.
The problem tables use the master source property, maybe it's related to that.
There are other problems with the master-detail connection, I'll open another topic for that.
Posted: Fri 17 Dec 2010 07:57
by AndreyZ
Unfortunately, I still canot reproduce the problem.
To answer this question I need a script to create and fill a table which causes the problem. Or you can try composing a small sample to demonstrate this problem. Please send me a script or a sample to andreyz*devart*com.
Posted: Mon 20 Dec 2010 09:26
by mhelmstedt
Don't have the time for experiments at the moment, but could there be a problem in conjuntion with the Fast Report Components?
Posted: Mon 20 Dec 2010 14:08
by AndreyZ
I've tried to reproduce this problem with FastReport Components, but there was no error.
Posted: Mon 20 Dec 2010 15:47
by mhelmstedt
Hi Andrey,
for further analysis I've sent you my database by mail.
Thanks in advance,
br,
Martin
Posted: Wed 22 Dec 2010 08:32
by AndreyZ
I've opened your database with RAD Studio XE Update1 and the FastReport components without any errors. Work with the T_KUNDE table didn't cause any errors as well. Please try the following:
- remove IBDAC;
- remove all *dac*.bpl files;
- remove *.dcu files from your project;
- reinstall IBDAC.