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
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

kelvinyip,

i've checked your example. Result is attached @pm. But i don't know anything about XE2 Update4. Do we expect differences here?
Can you show me what your results are?

Your example works perfectly.... I also compared the chinese characters with MySQLWorkbech. Everything is fine.

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
kelvinyip
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: 18.03.2011, 14:28

Post by kelvinyip »

Finally, I noticed that I can successfully insert all characters when I change the "Language for Non-Unicode Programs" from Chinese to English. That was strange.

Anyone have ideas ?
markus
Senior Boarder
Senior Boarder
Posts: 58
Joined: 17.10.2011, 12:43
Location: Piotrków Trybunalski, Poland

Post by markus »

Hi all,
i've encountered problem with Zeos encoding utf8 strings.
Image
two visible rows are added with the same exe, more even in the same session.
both should be "ąę" values, but first one have broken encoding.
What is most surprising, i cannot reproduce this error wit certain pattern. Sometimes it is ok and sometimes it's bad.
Moreover, sometimes (also without a pattern) i get error:
Image

i'm working with Postgresql 9.0 and zeos revision 1293.

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

Post by EgonHugeist »

markus,

"sometimes" is strange. But i will check this, Marek.

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
markus
Senior Boarder
Senior Boarder
Posts: 58
Joined: 17.10.2011, 12:43
Location: Piotrków Trybunalski, Poland

Post by markus »

i know it's strange - i've been trying to get solid reproduction pattern since yesterday - with no effect.
miab3
Zeos Test Team
Zeos Test Team
Posts: 1310
Joined: 11.05.2012, 12:32
Location: Poland

Post by miab3 »

@EgonHugeist

Simple Firebird 2.5(Win) application with table(from AnyDAC test) and dbgrid, working only when compiling on not unicode Delphi 2006.

The same application compiling on DXE2 32 and 64 bits
and on Lazarus/fpc for Window 32 and 64, freeze or destroys data.

Michal Abramczyk
Last edited by miab3 on 05.09.2012, 20:41, edited 2 times in total.
ism
Zeos Test Team
Zeos Test Team
Posts: 202
Joined: 02.10.2010, 20:48

Post by ism »

Ansi string length and UTF8 string length can be different. Potentially this may result to crash
Lazarus 1.0.8 fpc 2.6.0
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

@ism,
that's my thought too. I know in MySQL TZField.Size = DatabaseField.Size * 3. This MMVisual showd me. And Mark told me that this was done exacly because of the multible byte size of the encoded chars.

@miab3,
I'll check this tomorrow. Thank you for that hint. The Blob's aren't the problem here. i think the tbinary VARCHAR is the trouble-maker.

@markus,
what can i say? Nothing to find. But while debugging Zeos sometimes i had the strange behavior that a function like AString := String(UTF8Encode(AUnicodeString/AWideString)); returns a non encoded result. Which means AString = AUnicodeString; That could be a possible reason for the ascendend chars and also for the wrong-byte encoding.
Now i've introduced a GetEscapeString(const Value: PAnsiChar): String; function. Here i can be 100% sure the a real encoded UTF8String is comming in and the Result is a valid String-Cast. This is done for PostgreSQL, MySQL, SQLite. I hope this strange random issue is gone now.

Rev. 1296

Michael
Last edited by EgonHugeist on 18.05.2012, 23:01, edited 1 time in total.
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
ism
Zeos Test Team
Zeos Test Team
Posts: 202
Joined: 02.10.2010, 20:48

Post by ism »

Ups, not compile

Code: Select all

DriverManager.LogMessage(lcConnect, PlainDriver.GetProtocol, LogMessage);

  LogMessage := 'set textlimit=2147483647';
  if GetPlainDriver.dbsetopt(FHandle, GetPlainDriver.GetVariables.dboptions[Z_TEXTSIZE] , '2147483647') <> DBSUCCEED then <--------------------
    CheckDBLibError(lcConnect, LogMessage);
  DriverManager.LogMessage(lcConnect, PlainDriver.GetProtocol, LogMessage);     
/testing-egonhugeist/src/dbc/ZDbcDbLib.pas(417,54) Error: identifier idents no member "GetVariables"
/testing-egonhugeist/src/dbc/ZDbcDbLib.pas(417,87) Error: Identifier not found "Z_TEXTSIZE"
/testing-egonhugeist/src/dbc/ZDbcDbLib.pas(750) Fatal: There were 2 errors compiling module, stopping
Last edited by ism on 18.05.2012, 22:51, edited 1 time in total.
Lazarus 1.0.8 fpc 2.6.0
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

ism,
[s]
shit, patch comes in 10min.[/s] I was writing on the FreeTDS Driver...

Done Rev. 1297
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
ism
Zeos Test Team
Zeos Test Team
Posts: 202
Joined: 02.10.2010, 20:48

Post by ism »

All compiled, thanks
Lazarus 1.0.8 fpc 2.6.0
miab3
Zeos Test Team
Zeos Test Team
Posts: 1310
Joined: 11.05.2012, 12:32
Location: Poland

Post by miab3 »

@EgonHugeist

It seems that it is almost good(rev 1297).
In cursory testing, in principle, everything works except for the conversion of TIME in the DBGrid (and maybe DATETIME in Lazarus / fpc for Windows and Firebird 2.5).

I add corrected packages for XE2.

Michal Abramczyk
You do not have the required permissions to view the files attached to this post.
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

miab3,

this are good news. But actually i'm bussy with other things. I had no time to check this time values and you interbase issues. But i added it to my todo list. Do you have some suitable results eventually?

Michael what's wrong with the XE2 packages again? Why do you attach them again? Did i something 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

Fixed placement of modules in dpk and strengthened the DEBUG options.

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

Post by EgonHugeist »

@miab3,

ok, patch done Rev. 1299

Next thing concering these wrong time values:
If you enter 1:1 or 1-1 what do you expect now?

I can't judge if the 1:1 is one hour and one minute or one minute and one second. What is right and what is wrong? The same behavior for the date values..

How do the other components solve this issue?

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