Full Unicode/Ansi-Support in /testing branch

The alpha/beta tester's forum for ZeosLib 7.0.x series

Report problems concerning our Delphi 2009+ version and new Zeoslib 7.0 features here.

This is a forum that will be removed once the 7.X version goes into stable!!

Moderators: gto, EgonHugeist, olehs

Locked
jujibo
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 08.06.2012, 11:07

Post by jujibo »

@EgonHugeist

Sorry, Lazarus only for now. My Delphi version is a bit outdated (Delphi 4.0). In the future, it could be.

Julio
miab3
Zeos Test Team
Zeos Test Team
Posts: 1310
Joined: 11.05.2012, 12:32
Location: Poland

Post by miab3 »

@EgonHugeist

For version ZEOS7eh_1381
A cursory check ADO works in Delpi2006 DelphiXE2-32 and DelphiXE2-64.
Slow but it works. :lol:
Update too.

For now, I have tested only a connection to MS SQLEXPRESS 2008-64:

Provider=SQLNCLI10.1;User ID=sa;Initial Catalog=master;Data Source=SERV\SQLEXPRESS;Initial File Name="";Server SPN=""

Michal Abramczyk
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

@jujibo,

seems like you're a single taskforce too?! :D I'll whatch what happens to your components...

@miab3,

These are good news again. Now i want to find out what's going wrong on my side. You can help me here. I use a table definition of our test-scripts: \database\create_mssql.sql -> table people.
That's a table definition with binary- and text-lob's. Is it possible that they are making trouble?

My connection string: Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=zeoslib;Data Source=EGON-LAPTOP\SQLEXPRESS

I use "Microsoft OLE DB Provider for SQL Server" which one do you use here?

Michael
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
miab3
Zeos Test Team
Zeos Test Team
Posts: 1310
Joined: 11.05.2012, 12:32
Location: Poland

Post by miab3 »

@EgonHugeist

Delete Integrated 'Security=SSPI;' from connection string and try.

Michal
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

@miab3,

Michal i've remoed the selected fields now step by step. Everything is working fine except the binary blob's so i'll check whats going wrong...

Michael
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
miab3
Zeos Test Team
Zeos Test Team
Posts: 1310
Joined: 11.05.2012, 12:32
Location: Poland

Post by miab3 »

@EgonHugeist

I encountered a problem with the field(MS SQL):
Discontinued bit NOT NULL
In the Products table.
It is interpreted as a boolean and can only be true.

Michal
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

@miab3,

is that product table a table of the Northwind-DB? Actually i do not have the Installation CD here. So can you generate a create script and post it here?

Michael
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
miab3
Zeos Test Team
Zeos Test Team
Posts: 1310
Joined: 11.05.2012, 12:32
Location: Poland

Post by miab3 »

@EgonHugeist

It should be here
http://www.microsoft.com/en-us/download ... x?id=23654
Inside is also SQL creation script.

Michal
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

miab3,

thank you. I've installed this sample. I hope i can solve it. [s]Actually i'm reading me through the documentations according my blob issue i have..[/s]
Patch done Rev.1384

I'll chek your reported bug the next days, Michal.

Michael
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
miab3
Zeos Test Team
Zeos Test Team
Posts: 1310
Joined: 11.05.2012, 12:32
Location: Poland

Post by miab3 »

@EgonHugeist

The bit field in MS SQL are still problems.

But I am about something else.
How to operate several CharacterSet in one table in MySQL?
For example, this:

CREATE TABLE t5 (
Lp Integer(11) NOT NULL AUTO_INCREMENT,
Nazwa VarChar(20) CHARACTER SET cp1250 COLLATE cp1250_polish_ci NOT NULL,
Nazwa1 NVarChar(20) COLLATE utf8_unicode_ci,
Ilosc Integer(10) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (
Lp
)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
CREATE INDEX Nazwa
ON t5(Nazwa);

Michal Abramczyk
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

miab3,

According the bit issue. In my mind the Booten field is right, because a bit can only be 0 or 1 just like the boolean or am i wrong. But why that bit is always true i'll check.

Michal, the MySQL server does all translations IF you set the ClientCodePage to "utf8". Then zeos execute the "set nnames=utf8" statement. Now the server and Zeos knows that every string is in UTF8 if you do not spezify it with a collation suffix in your own executed statements. If you have a non unicode field then the server converts the utf8string into the field colllation charset. The same happens if zeos receives the string data from the server. MySQL sends all Strings in one common characterset.

So my advice for you is to use the CientCodePage=UTF8 if you have such fields defined on the other hand the egonbranch checks for the default database characterset and if this one is cp1251 for example then some chars from the unicode field where show as '?'. This does the server...

Does this help you?

Michael
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
miab3
Zeos Test Team
Zeos Test Team
Posts: 1310
Joined: 11.05.2012, 12:32
Location: Poland

Post by miab3 »

@EgonHugeist

But what do I do if I get a database with tables filled with data from different charsets and I can not change them but I have to use them and update?

Short as possible. Why not work with a different encoding different table fields? It is after all in many bases are provided.

Michal
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

@miab3,

Now i can only barrely follow you. What do you mean exactly?

Like i wrote the server converts everything into ansi/unicode, all fields with characterset x if you set the ClientCodePage. You can use them now equal as unicode fields. Now you can update and use them or not?

Or do you mean you have a table with. Cp1251 collations and the where UTF8 chars written into some fields?

Or another example. We start from the premise that we've got one table with 4 varchar fields and each of them have a different characterset. Field1: cp1251, Field2: Latin1, Field3: UTF8, Field4: gb1080(chinese)

Each operation system decided how to display the incomming bytesequnce by the default codepage. You are not able to display the german accedend chars or the chinese Deu encoded chars on you os. USASCII chars are valid for all charactersets. Now tell me how you want to display the chars(which are either 1byte or PByte per char). What you want is only valid for either the system default codepage encoded characterset or unicode. All other non supported chars are not displayable right. (I know how you'll find some code according this in the ZCompatibility.pas And we need now WideFields too). The next issue is how to update the fields valid? It is possible but what about speed?

Michael
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
miab3
Zeos Test Team
Zeos Test Team
Posts: 1310
Joined: 11.05.2012, 12:32
Location: Poland

Post by miab3 »

@EgonHugeist

I know what's going on.
For DelphiXE2 after the introduction of national characters (for example MySQL table which I wrote) are stored in a database malfunction.

In D2006 is correct.
Insert:
D2006 Ać
DXE2 Ać
Return:
D2006 Ać
DXE2 Ać

Connection:
object ZConnection1: TZConnection
UTF8StringsAsWideField = True
ClientCodepage = 'utf8'
Catalog = 'test'
Properties.Strings = (
'codepage=utf8'
'PreprepareSQL=ON')
Connected = True
HostName = 'SERV'
Port = 0
Database = 'test'
User = 'root'
Password = 'pass'
Protocol = 'mysql-5'
Left = 36
Top = 20
end


Michal
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

miab3,

This is an good start to find that issue. Now i need the sequence how you've updated that field. Did you use an DBedit or an direct executed sql statement? If you use a statement then please post it, Michal.

Michael
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
Locked