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
miab3
Zeos Test Team
Zeos Test Team
Posts: 1310
Joined: 11.05.2012, 12:32
Location: Poland

Post by miab3 »

@EgonHugeist

Zeos7eh1399 version compiles and works on my environment (as before).

Can it be expected that you'll soon take care of improvement in the use of blob for PostgreSQL which was mentioned in:
http://zeos.firmos.at/viewtopic.php?t=3519
http://zeos.firmos.at/viewtopic.php?t=3523

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

Post by EgonHugeist »

miab3,

thank you for response.
According http://zeos.firmos.at/viewtopic.php?t=3519 that's slightly a difficult thing and i see no real reason for that. You can equal do all the stuff with a normat TBlobStream and zeos does write the changes. Can you give me a praxis example for what we need to write or read partial streams to the database directly?

[s]According http://zeos.firmos.at/viewtopic.php?t=3523 that seems like a 10 min job to do, Michal. No real problem the how to i've already posted. If i have the time then i'll do the job this evening or tomorrow.[/s]
Implemented 'chunk_size' to the Zquery properties and a lot of other internal things... Rev 1400

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 »

Thanks for the contribution of EgonHugeist. The utf-8 problem had been resolved for mysql for chinese characters. The only thing have to do is set clientcodepage to be utf8.
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

kelvinyip,

always a pleasure to help. I want to descibe the issue you had a little bit more detailed because you are the only one i know who worked in different characterset envirnonement then your OS has.

1. kelvinyip, did change the "Language for Non-Unicode Program" to Chinese and his OS is english. He reported me that in utf8 clientcharacterset environment variable always the same characters where missed.
2. After reverting this setting to the OS default once that strange behavior was gone.
3. I told him now two 100% Unicode-Save ways how to solve this issue: TZQuery.Options := [coPreferPreperad, coPreferPreparedResolver] or TZConnection.PreprepareSQL := True;

Only in these two ways we do not set UTF8Encoded values to a SQL-String (UnicodeString) and cast that string to a AnsiString which the Drivers do expect! Somewhere here we have an information lost...

Summary: Now he can change his settings to what ever he want! PreprepareSQL is more unicode save than Zeos ever was before. The same trouble exists in the other branches.

Starting to solve the same behavior for PostgreSQL... Bussy now..

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 »

In order to have been little bugs need a clear and simple structure of the code. Is code of Zeos well organized?
Is there a description of the purpose modules Zeos? I still do not know how it works.

Need something like
ZAbstractTable.pas - description
ZGroupedConnection.pas - description

In txt file in ./src/
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

For me Lookup word works when between keystrokes is less than about 2 seconds.

The Oracle error is if DXE2 and Lazarus-Win insert and see, "1aąę" then in D2006 I see"1aÄ…Ä™" in the same field.

Attached another version XE2 packages (ProjectGroup16.groupproj).
In Options, add the path:

c: \ Program Files (x86) \ Embarcadero \ RAD Studio \ 9.0 \ Libs \ ZEOS \ Packages \ delphiXE2 \ Win32 \ Release

or

c: \ Program Files (x86) \ Embarcadero \ RAD Studio \ 9.0 \ Libs \ ZEOS \ Packages \ delphiXE2 \ Win64 \ Release

and Debug:

c: \ Program Files (x86) \ Embarcadero \ RAD Studio \ 9.0 \ Libs \ ZEOS \ Packages \ delphiXE2 \ Win32 \ Debug

or

c: \ Program Files (x86) \ Embarcadero \ RAD Studio \ 9.0 \ Libs \ ZEOS \ Packages \ delphiXE2 \ Win64 \ Debug

Michal Abramczyk
You do not have the required permissions to view the files attached to this post.
Last edited by miab3 on 23.06.2012, 23:00, edited 2 times in total.
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

@ism,

Thought you've a XE2 compiler, if yes then rightclick the package and click ?Model-support? then you can see each object of zeos in a unified modeling language diagramm and all objects do export the descendands etc..

@miab3,

did commit a small oracle patch with my ZPlainString function for FieldTpe stString of Oracle. Did you open oracle with a UTF8 codePage? If yes and UTF8AsWideString is false then this result is correct. Actually i've got again trouble with oracte on Vista64. I'll reinstall that engine tomorrow and add this to my visual tests.

Btw. Did anyone work with our testsuites?

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

I do like you wrote but the result is not correct.
The field is of type VARCHAR2 (20)

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

Post by EgonHugeist »

@miab3,

i think you missunderstoud me. The utf8 encoded cryptical ansistring is right for the AnsiDelphis if you open the connection with UTF8. Try to use CL8MSWIN1251 instead for the AnsiDelphis. Bud it could be equal right what you're saying. Like i wrote i just have started with oracle. I didn't made some deep-test or visual apps with oracle..

Now i took a look to you modified packages again. Bad news, this times i can't accept these files. You did add to man units to the packages which we normaly do implicit import IF the defines in the Zeos.inc are enabled. Example: {$IFED ENABLE_INTERBASE}the interbase untits {$ENDIF}. This makes it possible to exclude the compiling of the units a user don't need. I think {$WARN IMPLICITIMPORT OFF} would be the better choise, Michal.

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

I do not know why but Delphi XE2 loses the $IFDEF in dpk.

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

Post by miab3 »

@EgonHugeist

I can [s]not[/s] get the identical presentation of data in DBGrid between analogue D2006 and DXE2 applications for Oracle tables.

[s]CL8MSWIN1251 in D2006 does not help.[/s]

But, however, can be the setting in my case for D2006 ClientCodepage EE8MSWIN1250

Zeos7eh1412. D2006, DXE2 32/64, LazarusWin1.1 32/64.

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

Post by EgonHugeist »

@miab3,
I do not know why but Delphi XE2 loses the $IFDEF in dpk.
This is already known for me. This is an alltimes issue of Delphi. I think we can solve this if we introduce a new Unit ZIventAllerter.Pas which is always included in the packages. Then we add then descandat units to the header uses clause and do an implizit import like int the TZDbcConnection.pas. Then this stupid issue shold be gone. But that was'nt my problem, Michal. You've added to many units to the dpk files which we normaly do implizit import. IF they are added then our {$IFDEF ENABLE_POSTRES} defines do not longer work...
But, however, can be the setting in my case for D2006 ClientCodepage EE8MSWIN1250
Now the server does the char convertations and you Ansi-Delphi can display everything right. But it should work equal got if you set TZConnection.UTF8AsWideString to true if you use characterset UTF8 or not?

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

It could work but it does not work.
In other words, build the same program in D2006 and DXE2 able to operate the same way without changing settings.

Maybe because I have AMERICAN server settings?

NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_CHARACTERSET AL32UTF8
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE


(Zeos7eh1413 compiles and runs D2006, DXE2 32/64, LazarusWin1.1.0/fpc 2.7.1 32/64)

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

Post by EgonHugeist »

@miab3,

I'm not a Oracle OCI hero. The characterset is the NLS_Characterset. In your case AL32UTF8 or AL16UTF16(not supported from Zeos so i set UTF8 instead). Which means both are Unicode. We set the NLS_LAN and Lang to the same characterset to have the same field behavior for all string types.

If i do understand you right, then is the TZConnection.ClientCodePage empty. And Zeos eh does swith always to the default one. You can use the 1252 codepage equal with your XE2, Michal. Either this way ire you change the NLS_LAN of Oracle.

Hm but why does the Utf8As2wideString property not work i have to check...

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

XE2:

object ZConnection1: TZConnection
UTF8StringsAsWideField = True
ClientCodepage = 'UTF8' // '1ąća'
Properties.Strings = (
'codepage=UTF8'
'PreprepareSQL=ON')
TransactIsolationLevel = tiReadCommitted
Connected = True
Port = 0
Database = 'serv'
User = 'system'
Password = 'pass'
Protocol = 'oracle'
Left = 28
Top = 28
end


D2006:

object ZConnection1: TZConnection
UTF8StringsAsWideField = True
ClientCodepage = 'UTF8' // '1ąća'
Properties.Strings = (
'codepage=UTF8'
'PreprepareSQL=ON')
TransactIsolationLevel = tiReadCommitted
Connected = True
Port = 0
Database = 'serv'
User = 'system'
Password = 'pass'
Protocol = 'oracle'
Left = 32
Top = 16
end

D2006:

object ZConnection1: TZConnection
UTF8StringsAsWideField = True
PreprepareSQL = False /// ???
ClientCodepage = 'EE8MSWIN1250' // '1ąća'
Properties.Strings = (
'PreprepareSQL=ON' /// ???
'codepage=EE8MSWIN1250')
TransactIsolationLevel = tiReadCommitted
Connected = True
Port = 0
Database = 'serv'
User = 'system'
Password = 'pass'
Protocol = 'oracle'
Left = 32
Top = 16
end

Michal
Locked