Page 40 of 44

Posted: 04.11.2012, 22:15
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

Posted: 04.11.2012, 23:27
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.

Posted: 04.11.2012, 23:35
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.

Posted: 04.11.2012, 23:37
by miab3
EgonHugeist,

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

Michal

Posted: 05.11.2012, 09:21
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

Posted: 05.11.2012, 09:33
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?

Posted: 05.11.2012, 10:26
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

Posted: 05.11.2012, 10:48
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...

Posted: 05.11.2012, 11:34
by miab3
EgonHugeist,

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

Michal

Posted: 05.11.2012, 13:30
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?

Posted: 06.11.2012, 10:24
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

Posted: 06.11.2012, 20:38
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.

Posted: 07.11.2012, 20:02
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.

Posted: 07.11.2012, 23:30
by EgonHugeist
alexs,

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

R1991

Posted: 09.11.2012, 09:38
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..