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 »

patyit,

can you give me a full list please? Don't have a linux actually (a remaining part of mine).

Patch done 1972
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
patyit
Junior Boarder
Junior Boarder
Posts: 37
Joined: 10.02.2012, 18:39

Post by patyit »

I have again compiler error. I can fix it now, I think it is miss typo ...

/home/patyi/lazarus-svn/zeos7_test/src/core/ZEncoding.pas(669,33) Hint: Mixing signed expressions and longwords gives a 64bit result
/home/patyi/lazarus-svn/zeos7_test/src/core/ZCompatibility.pas(687,31) Error: Identifier not found "Astring"
/home/patyi/lazarus-svn/zeos7_test/src/core/ZCompatibility.pas(844) Fatal: There were 1 errors compiling module, stopping

function TZCodePagedObject.ZPlainUnicodeString(const AStr: String): WideString;
begin
{$IFDEF DELPHI12_UP}
Result := AStr;
{$ELSE}
{$IFDEF WITH_LCONVENCODING}
Result := UTF8ToString(AStr);
{$ELSE}
{$IF defined(DELPHI) or defined(MSWINDOWS)}
Result := AnsiToWide(AStr, FConSettings.CTRL_CP);
{$ELSE}
case Consettings.CPType of
cGET_ACP:
if FConSettings.CTRL_CP = zCP_UTF8 then
UTF8Decode(AStr) // orginal code UTF8Decode(Astring)
else
Result := WideString(AStr); //default Ansi to Wide cast for all comilers
else
Result := UTF8Decode(AStr);
end;
{$IFEND}
{$ENDIF}
{$ENDIF}
end;

After this fix finally Zeos is compiled ! I hope it is no more errors in it.
(XUbuntu 32, Lazarus latest svn, fpc 2.6.1 latest svn, Zeos 7 r1972 svn)

Thank for help, Patyi.
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

patyit,

thank you. Patch applied R 1973. I'm really sorry for that..

Nope you don't have to worry. Acutally the most parts are out of use and a preparation for the remaining LibIconvert implementation. I've allready started downloading a Linux for a VirtualBox.
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,

Michael
Still in varchar(10) Lazarus cut to 5 national characters.

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

Post by miab3 »

EgonHugeist,

R1974, Delphi 2006, compile-time error:

Code: Select all

[Pascal Error] ZEncoding.pas(712): E2008 Incompatible types
[Pascal Error] ZEncoding.pas(712): E2015 Operator not applicable to this operand type
[Pascal Fatal Error] ZCompatibility.pas(265): F2063 Could not compile used unit '..\..\src\core\ZEncoding.pas'

Code: Select all

if ( ConSettings.CTRL_CP = cGET_ACP) or (ConSettings.CTRL_CP = ConSettings.ClientCodePage.CP) then //second test avoids encode the string twice
( ConSettings.CTRL_CP = cGET_ACP) <--

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

Post by EgonHugeist »

miab3,

:oops: :oops: Not my weekend, really not! :oops: :oops:
It was not my intention to bother you guys.

R1975.

Also did i commit an appproach accordingly Lazarus/AnsiDelphi for ControlsCodePage=cCP_UTF8. I left the FieldDisplayWidth untouched and increasesd Field.Size(DataSize in bytes) *4.

Possible is also that the DisplayWidth is wrong, Michal. Can you test it again?
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,

R1975.
Compile in D2006, DXE2 32/64/C++, Lazarus 32/64 Win {$DEFINE WITH_LCONVENCODING}.

In some settings, are really too large field (in DBGrid), but it did not help Lazarus.
I still can not save 10 national characters in varchar(10) in Firebird 2.5.3 NONE.

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

Post by EgonHugeist »

miab3,

ok, Michal. I've reverted this patch and fixed two other issues.

Accordingly the FireBird issue. Did you read some documentations of Firebird? Now the fields have been big enough to hold also big endian encoded UTF8-Chars but if that doesn't solve this issue i've to sart from the premisse it is not a Zeos issue...
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,

Michael,
That you know?
http://www.firebirdsql.org/refdocs/lang ... -none.html

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

Post by EgonHugeist »

miab3,

Nope i didn't know anything about it. Well that's a good point to fifure out the issue. But i'm still wondering why delphi and Lazarus behave in two different kinds. Which charset did you set for Zeos+Delphi?

And can you please use FlameRobin to check how the data is written? Are there differences too?
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
Sorien
Fresh Boarder
Fresh Boarder
Posts: 13
Joined: 18.04.2012, 12:29

Post by Sorien »

Hi, i found small problem with unicode when i create field longer then ~2000 chars like "VARCHAR(4000) CHARACTER SET UTF8 NOT NULL COLLATE UTF8" and store unicode string with like 3000 chars and query for that row, zeos will break encoding and shows it like in ascii not utf8 but when i open that table in editor encoding looks ok ... when change size to ~2000 chars "VARCHAR(2000) CHARACTER SET UTF8 NOT NULL COLLATE UTF8" everything is ok again

Branch Revision: 1553, FB db

Edit: Master Branch doesnt seems to have this problem
Zeos 7.0 - egonhugeist branch, DB charset and collation UTF-8, Connection UTF-8, Win7 64Bit
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

Sorien,
Branch Revision: 1553, FB db
Do you mean the deprecated \testing-egonhugeist branch? The development has stopped there. Checkout http://svn.code.sf.net/p/zeoslib/code-0 ... es/testing instead.

Acually we are on R1979 (testing).

Would you be son kind and swith the branches, verify the issue again. If the issue remaning please post again.
Last edited by EgonHugeist on 09.11.2012, 10:59, 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
alexs
Fresh Boarder
Fresh Boarder
Posts: 10
Joined: 10.01.2011, 10:46

Post by alexs »

Please - add this line in ZeosLazarus.inc

{$DEFINE LAZARUSUTF8}

It is necessary for the correct display of Russian error messages when connecting to a PostgreSQL database in the module ZDbcPostgreSqlUtils on line 737 of Windows.
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

alexs,

done Alex. But i did it in another way (more simple and the define was stupid).

R1991
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 »

miab3,

Can you please update to 1995 on Debian. Than please do NOT use the WITH_LCONVENCODING define and try to use autoencode + FreeTDS? I think i found a common way. But i don't know if it works like i wanna have it..
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