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 »

miab3,

You don't need to check it. I personally wanted have a spezial compiled version. I've looked to the FreeTDS sources and checked why 3 function are currently not supported (the reason why FreeTDS does return nothing, i only suppressed the exceptions on trying to access these function)

The missing functions are added to FreeTDS + Sybase. I wonder why, but i was not able to chage this -> i'm a bad C-Coder.

The missing funtions are:
DBLibAPI.dbRetData
FreeTDSAPI.dbHasRetStat
?? don't know right now. (rettype?)

For me personally this is a bug of FreeTDS because i can clearly see on the Zeos code, these function have been supported from the old ntwdlib.dll of MsSQL before. For Sybase it seems to work works.

Anyway thank for this link and confirmation that it works with fpc + autoencode = True too. I'll add this link to our readme.
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,

What's with WITH_TBYTEDYNARRAYTOVARIANT ?
Delphi XE3 has now a problem in the file ZAbstractRODataset.pas in line:

1304: System.Move ((PAnsiChar (RowAccessor.GetColumnData (columnIndex, Result)) + 2) ^, Buffer ^,
RowAccessor.GetColumnDataSize (columnIndex) -2);

R1930 and probably earlier(R1927 Zeos.inc).

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

Post by EgonHugeist »

miab3,

i've detected an issue with D2009, D2010 and FPC with ParmeterType ftBytes. Our parameters couldn't assign the Byte arrays. Now i've redfined WITH_TBYTEDYNARRAYTOVARIANT since XE. Does it solves the issue?

R1933.
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,

R1933
D2006, D2007, DX2, DX3 compiles.

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

Post by miab3 »

EgonHugeist,

Zeos7.0.1-beta branches_ testing_r1933:

http://svn.code.sf.net/p/zeoslib/code-0 ... s/testing/

compiles and runs on (I have tested):

- D2006,
- D2007 -> C++,
- DXE2 32/64 -> C++32,
- Lazarus Win 1.1/fpc 2.7.1 32/64,
- Lazarus Lin 1.1/fpc 2.7.1 64 on Debian 64-bit (LMDE 201204).

(Firebird 2.5.3, MySQL 5.5.18, MariaDB 5.5.28, Oracle 11g EE, PostgreSQL 9.2.1, MSSQL 2008 R2 Express - ado, mssql Windows Delphi - FreeTDS with national characters Windows Linux 32-bit 64-bit Delphi Lazarus)

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

Post by miab3 »

EgonHugeist,

Michael
Could you explain the meaning and dependencies between:

AutoEncodeStrings,
ClientCodePage,
ControlsCodePage,
UTF8StringsAsWideField

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

Post by EgonHugeist »

miab3,

AutoEncodeStrings:
-For D2009+ allways true because of the UnicodeString
-For all other compilers can this be choosen. It means to convert the string from the local controls CodePage to the DataBase expected CodePage and reverted.

ClientCodePage: The Client-CharacterSet the current connection uses. Also strictly needed to get the autoencoding running.

ControlsCodePage:
D2009+ allways cCP_UTF16 (UnicodeString)
for all otheres variable. The purpose is to convert the DataBase encoded strings to the ControlsExpected codepage. If the Controls do support WideStrings (the most compilers do automatic conversations also fo ansi-controls) AND the ClientcodePage = UTF8 then Zeos assumes Wide-Fields.
Also can you open a WIN1251 Connection and set target CodePage to cCP_UTF8. Zeos can convert all the Strings to UTF8. A nice feature for FireBird for example. Also is it again a question of which controls the user have. Some users have UTF8 or WideString based controls for the Ansi-Compilers. The Lazarus assume allways UTF8 and the do convert everything to display the values.


UTF8StringsAsWideField is deprecated. I'll drop this property soon because this can equal controled by ControlsCodePage.

I was forced to implement the two different CodePageType to make it possible to make such autoencoding stuff.

Hope this explaination was detailed enough.
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,

Thanks. Exactly what I wanted.
And for Firebird 3.0, you thought about it?
May be helpful to compare the files *.h from directories 'include' FB 2.5 and FB 3.0.

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

Post by EgonHugeist »

miab3,

Didn't fogett FB3, Michal. Actually i've managed the rawbytestring for fpc2.7.1 and D2009+ to avoid too many stringconversations we did on the statements for D12_UP and the fpc does. One example is a hint of one FPC coder: PChar(x)=PChar(y) is 100x slower than with FPC2.6.down. While doing that i found some more fpc bugs but i had not the time for an issue report.. The do endless frack the origin of the Ansistring and funtion like AnsiToUtf8 have no effect if we do not move the memory from x to y. And so on. Well FPC2.7.1 is not stabe yet..
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,

Zeos7.0.1-beta branches_ testing_r1940:

http://svn.code.sf.net/p/zeoslib/code-0 ... s/testing/

compiles and runs on (I have tested):

- D2006,
- D2007 -> C++,
- DXE2 32/64 -> C++(32),
- Lazarus Win 1.1/fpc 2.7.1 32/64,
- Lazarus Lin 1.1/fpc 2.7.1 64 on Debian 64-bit (LMDE 201204).

(Firebird 2.5.3, MySQL 5.5.18, MariaDB 5.5.28, Oracle 11g EE, PostgreSQL 9.2.1, MSSQL 2008 R2 Express)

Michal
Last edited by miab3 on 30.10.2012, 08:20, edited 2 times in total.
miab3
Zeos Test Team
Zeos Test Team
Posts: 1310
Joined: 11.05.2012, 12:32
Location: Poland

Post by miab3 »

EgonHugeist,

In file zeos.inc:
214: {$ DEFINE WITH_TVALUEBUFFER} ^ <--- do not need a sign

in file zeoslazarus.inc:
in lines 74-76 could probably uncomment.

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

Post by EgonHugeist »

miab3,
In file zeos.inc:
214: {$ DEFINE WITH_TVALUEBUFFER} ^ <--- do not need a sign
Patch done R1941

in file zeoslazarus.inc:
in lines 74-76 could probably uncomment.
I wish i could. Zeos is made also for FPC without Lazarus. Which means if i remove uncomment these defines then i've to ask the LCL-Core if we are allowed to provide this unit. I know it's messy allways uncommenting these 3 lines after some of my changes but actually i can't use them by default. Further more are then some people which having compiling issues because Zeos does expect the unit is available in the current path environment variables. Which isn't by default AFAIK.

Btw. Text-Lob autoencoding should work since 1940 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
miab3
Zeos Test Team
Zeos Test Team
Posts: 1310
Joined: 11.05.2012, 12:32
Location: Poland

Post by miab3 »

EgonHugeist,

Zeos7.0.1-beta branches_ testing_r1945:

http://svn.code.sf.net/p/zeoslib/code-0 ... s/testing/

compiles and runs on (I have tested):

- D2006,
- D2007 -> C++,
- DXE2 32/64 -> C++(32),
- Lazarus Win 1.1/fpc 2.7.1 32/64.

But for Lazarus Lin 1.1/fpc 2.7.1 64 on Debian 64-bit (LMDE 201204) with uncomment {$DEFINE WITH_LCONVENCODING} I get error:

Code: Select all

/usr/lib/codetyphon/lazarus/components/pl_ZeosDBO/source/core/ZEncoding.pas(645,35) Error: identifier idents no member "PlainConvert"
/usr/lib/codetyphon/lazarus/components/pl_ZeosDBO/source/core/ZEncoding.pas(666,29) Error: identifier idents no member "PlainConvert"
/usr/lib/codetyphon/lazarus/components/pl_ZeosDBO/source/core/ZEncoding.pas(730,52) Error: identifier idents no member "DbcConvert"
/usr/lib/codetyphon/lazarus/components/pl_ZeosDBO/source/core/ZEncoding.pas(811,40) Error: identifier idents no member "DbcConvert"
/usr/lib/codetyphon/lazarus/components/pl_ZeosDBO/source/core/ZEncoding.pas(839) Fatal: There were 4 errors compiling module, stopping
when compiling applications with Zeos.

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

Post by EgonHugeist »

miab3,

can you make a update? R1949. Can't see the real issue but these lines had been these with PAnsiChar(Byte) which the compiler don't like. I'll test it tonight ):
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,

In R1949 very similar:

Code: Select all

/usr/lib/codetyphon/lazarus/components/pl_ZeosDBO/source/core/ZEncoding.pas(735,33) Error: identifier idents no member "PlainConvert"
/usr/lib/codetyphon/lazarus/components/pl_ZeosDBO/source/core/ZEncoding.pas(751,35) Error: identifier idents no member "PlainConvert"
/usr/lib/codetyphon/lazarus/components/pl_ZeosDBO/source/core/ZEncoding.pas(796,52) Error: identifier idents no member "DbcConvert"
/usr/lib/codetyphon/lazarus/components/pl_ZeosDBO/source/core/ZEncoding.pas(823,27) Error: identifier idents no member "PlainConvert"
/usr/lib/codetyphon/lazarus/components/pl_ZeosDBO/source/core/ZEncoding.pas(918,40) Error: identifier idents no member "DbcConvert"
/usr/lib/codetyphon/lazarus/components/pl_ZeosDBO/source/core/ZEncoding.pas(949) Fatal: There were 5 errors compiling module, stopping
Michal
Locked