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
mrLion
Senior Boarder
Senior Boarder
Posts: 71
Joined: 20.03.2010, 10:17

Post by mrLion »

Michael
do i understand you right the Param :not is not detected as Param and is used as KeyWord?
may be yes, may be no. if ":not" change to ":nt" - no errors on runtime. Is there some other explanation of what?
The impression that the treatment of the internal parser, before sending the string to the server ".... fld =: not, ..." turns into ".... fld =:, ..."
in principle, the problem is solved without adjusting the library, but would like some kind of "completeness" of code.
This i do not understand, Ivan. Why this WideString-Cast?
As I said earlier, is used XE2. There's the whole text is represented as a UnicodeString. If I do not produce direct changes in WideString, the record VARCHAR fields leads to an error when using the national Russian text. If the result - it all works.
Although the need for such a transformation of the mystery for me. For some reason I thought that UnicodeString - it's just an advanced class of WideString. Borland does not cease to amaze me, for 25 years ... A mysterious they all ... :)
miab3
Zeos Test Team
Zeos Test Team
Posts: 1310
Joined: 11.05.2012, 12:32
Location: Poland

Post by miab3 »

@EgonHugeist

Could you put a simple test that shows the error PByte and Win64 about which you write?
I use the Windows7/64 Delphi XE2 and Lazarus in this distribution:
http://www.pilotlogic.com/sitejoom/index.php/codetyphon
(CodeTyphon current version 2.60)
and I do not see this error.

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

Post by EgonHugeist »

miab3,

I just used our test-suites.
the thread where i've detected this issue. http://zeos.firmos.at/viewtopic.php?t=3 ... c&start=45

But we used FPC2.6. Does that mean you've no problems with Blob fields and FPC2.7.1+W64? (CodeTyphon 2.6 !terific! never know for me)
Oh that's strange. I already was not lucky with that solution. But it works. I'm not a FPC specialist so i let me guid here..
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 »

svn 1281
Not compile in Linux 64
/home/stas/bin/testing-egonhugeist/src/dbc/ZDbcCache.pas(358,13) Error: Incompatible types: got "Boolean" expected "Int64"
/home/stas/bin/testing-egonhugeist/src/dbc/ZDbcCache.pas(378,13) Error: Incompatible types: got "Boolean" expected "Int64"
/home/stas/bin/testing-egonhugeist/src/dbc/ZDbcCache.pas(384,29) Error: Incompatible types: got "ShortInt" expected "Boolean"
/home/stas/bin/testing-egonhugeist/src/dbc/ZDbcCache.pas(386,29) Error: Incompatible types: got "ShortInt" expected "Boolean"
very strange
Lazarus 1.0.8 fpc 2.6.0
ism
Zeos Test Team
Zeos Test Team
Posts: 202
Joined: 02.10.2010, 20:48

Post by ism »

With this patch for svn 1281 working

Code: Select all

Index: src/component/ZUpdateSqlEditor.pas
===================================================================
--- src/component/ZUpdateSqlEditor.pas	(revision 1281)
+++ src/component/ZUpdateSqlEditor.pas	(working copy)
@@ -1017,7 +1017,8 @@
 end;
 
 procedure TZUpdateSQLEditForm.FormResize(Sender: TObject);
-Var i: Integer
+Var
+  i: Integer;
 begin
   i := PageControl.Height - 92;
   If i < 0 Then i := 0;
Index: src/dbc/ZDbcCache.pas
===================================================================
--- src/dbc/ZDbcCache.pas	(revision 1281)
+++ src/dbc/ZDbcCache.pas	(working copy)
@@ -355,7 +355,7 @@
 begin
   BlobPtr := PPointer(@Buffer.Columns[FColumnOffsets[ColumnIndex - 1] + 1]);
   NullPtr := PBoolean(@Buffer.Columns[FColumnOffsets[ColumnIndex - 1]]);
-  if NullPtr^ = {$IFDEF FPC}0{$ELSE}false{$ENDIF} then
+  if (NullPtr^ = false) then
     Result := IZBlob(BlobPtr^)
   else
     Result := nil;
@@ -375,15 +375,15 @@
 begin
   BlobPtr := PPointer(@Buffer.Columns[FColumnOffsets[ColumnIndex - 1] + 1]);
   NullPtr := PBoolean(@Buffer.Columns[FColumnOffsets[ColumnIndex - 1]]);
-  if NullPtr^ = {$IFDEF FPC}0{$ELSE}false{$ENDIF} then
+  if NullPtr^ = false then
     IZBlob(BlobPtr^) := nil
   else
     BlobPtr^ := nil;
   IZBlob(BlobPtr^) := Value;
   if Value <> nil then
-    NullPtr^ := {$IFDEF FPC}0{$ELSE}false{$ENDIF}
+    NullPtr^ := false
   else
-    NullPtr^ := {$IFDEF FPC}1{$ELSE}True{$ENDIF};
+    NullPtr^ := True;
 end;
 
 {**
@@ -2406,4 +2406,4 @@
   end;
 end;
 
-end.
+end.
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 »

Thank god, ism is here. Hmm miab has problems with XE2 and this solution.

So i tryed the golden middle way.. But i didn't saw you proposal, sorry. R.1283

But all that here is only a terrible workaround. Why does Michael with FPC 2.7.1 write now he has no Blob problems? I already had this strange effect! 100%

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

Post by EgonHugeist »

@mrLion,

i have build a little sample project with some String-Values. And what can i say? There is something going terribly wrong. I'm afrraid it seems firebird can't set 'UTF8' if the database was created with CharacterSet 'NONE'.

Can you test TZConnection->ClientCodePage = 'WIN1251'?

Strarting again to read documentations..

Concerning the WideString-Cast: I can not believe that this must be used. TField.AsString expects a UnicodeString and Memo.Lines.Text is a UnicodeString.

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

Missing semicolon at the end of the line 1020 in file ZUpdateSqlEditor.pas

TZUpdateSQLEditForm.FormResize procedure (Sender: TObject);
Var i: Integer <------
begin
i: = PageControl.Height - 92;

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

Post by EgonHugeist »

miab3,

Patch done. Rev1285.

Was you able to figure out the PByte IZBlob issue with FPC+W64?
Thoughts concerning this issue:
What is if the Assigning of NullPtr^ := 1; Should be NullPtr^ := Byte(1). Is it possible that the constant "1" has no ByteSize? A PByte is a starting Adress of what ever. Which means we assign a 4/8 Byte value...

Somebody ideas or more expieriences here? The PBoolean is a @Int64 Value in FPC+WIN64.

I do not like these abnormal many Ifdefs 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
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

Ivan,

good news concerning FullUnicodeIDE and Firebird+UTF8. Rev. 1288

Your reported problem of maleformed strings should be gone. I think this part is completly solved for String-Fields and Text-Blob's.

For your ":not" or ":like" i have actually no soultion. (Out of time)

Strange effect of firebird: It seems like it is impossible to force FireBird2.5 to send/receive UTF8 encoded strings if the Database was not created in UTF8. But now you can set also a WIN1252 Connection character set. BUT All previous inserted data with UTF8 is no more displayed or not right displayed. I've debugged me completly down to the PlainDrivers and this strange effect is no result of Zeos.

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 »

Hi EgonHugeist,

I have tried your latest trunk, but I experience problem when saving Chinese characters using zeoslib. I am using Delphi XE2 update4.
The problem is exactly the same is the below post. Some characters are missing.
http://zeos.firmos.at/viewtopic.php?p=12834

Any idea?
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

kelvinyip,

humm, no not right now. But the thread is well known for me. You use MySQL as far as i can see on this thread, or am i wrong? For this engine i've still some Visual-Test case prepared where i have inserted all russian, chinese, east european, arabic Characters i have found in the WWW. In my eyes the MySQL Plain rework is ready. For MySQL i had realy no problems any more.

Do you still have the strange "?" effect? Are these environment variables of the thread from the client and serverside identical? Did you set the TZConnection.ClientCodePage := 'UTF8' or CodePage := 'UTF8'; in the Properties? Is your Database created in real Unicode or systemdefault characterset?

Which chinese characters are not displayable and how do you insert these?
You see: A lot of questions without some examples.

Michael

Btw. Serg77 also uses worldwide characters and has no problems...
Last edited by EgonHugeist on 16.05.2012, 19: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
mrLion
Senior Boarder
Senior Boarder
Posts: 71
Joined: 20.03.2010, 10:17

Post by mrLion »

Michael,
Your reported problem of maleformed strings should be gone.
i`m try testing. tomorrow. and then report to you. 1-2 days later.... or, may be 1 week later. :sorry:
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

Ivan,

that's ok. just a success or further bugs are nice to know about... :bash:

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 »

EgonHugeist,

Please check PM message.
Thanks.
Locked