Page 1 of 1

[patch_done] problem with zeos 7.03-stable in UTF8 strings

Posted: 20.01.2013, 07:29
by delphi887
hi every body :)
i used Zeos 7.0.0-dev for develop my application in lazarus 1.04 in Kubuntu 12.10 and windows XP with Mysql .
recently i upgrade Zeos to 7.03 stable and Occurred any problem
in my project string saved in database with UTF8 and Persian language.
in version 7.0.0-dev working fine but After upgrade to 7.03 stable string showing Shorter than the value stored in the database.
in picture
version 7.0.0-dev
Image

version 7.0.3-stable
Image

i set in version 7.03-stable Controls_cp=CP_UTF8 and codepage=utf8 but The problem is still not resolved
Where is my fault? please Help me :idea:

Posted: 20.01.2013, 08:31
by EgonHugeist
delphi887,

oh sorry i didn't look to the lazarus forum again. I think it is an Zeos issue. Wondering nobody else did report something like this. Can you plaese attach a little demo with a small create script? It should be equal to the table where you've got your problems.

Then i do my best to fix your issue.

Posted: 20.01.2013, 10:27
by delphi887
EgonHugeist wrote:delphi887,

Can you plaese attach a little demo with a small create script? It should be equal to the table where you've got your problems.
OK thanks for help :)
i create a simple demo project and mysql script Database very soon and attached for you .

Posted: 20.01.2013, 15:15
by EgonHugeist
delphi887,

i'm loonking forward for the attached template app.

Posted: 20.01.2013, 16:03
by delphi887
hi
i attached a little project and SQL Script for create database and table and a picture from project created with Zeos 7.0.0-dev working completly.
if you check data in the mysql workbench or phpmyadmin they are string complete but in project and Zeos 7.03 UTF8 string shorted.
tank you for helping

Posted: 20.01.2013, 19:26
by EgonHugeist
delphi887,

issue found. open ZAbstractRODataset.pas.

Goto line 1757 and replace

Fields.Size := ResultSet.GetMetadata.GetColumnDisplaySize(I+1);
with:
Fields.DisplayWidth := ResultSet.GetMetadata.GetColumnDisplaySize(I+1);

Thanks. Patch done R2134 \testing-7.1 (SVN) will be backported to 7.0.4 soon.

Posted: 20.01.2013, 20:42
by aliboy
:) edited.

Posted: 20.01.2013, 22:47
by aliboy
EgonHugeist wrote:delphi887,

issue found. open ZAbstractRODataset.pas.

Goto line 1757 and replace

Fields.Size := ResultSet.GetMetadata.GetColumnDisplaySize(I+1);
with:
Fields.DisplayWidth := ResultSet.GetMetadata.GetColumnDisplaySize(I+1);

Thanks. Patch done R2134 \testing-7.1 (SVN) will be backported to 7.0.4 soon.

I did not change my file(s).

sorry,
BUT,I think this is not a bug because ,at least works fine for me, shows UTF8 strings such as Persian and English characters correctly.
see pictures:
Lazarus with zeos 7.03-stable,I recently installed the zeos 7.03-stable.

Image

and the same data in MySQL:

Image

check and match the fields with each order (id by id,name by name,family by family),respectively.

OK?it's not a bug and for my claim you can see that combine different characters with long length.
*******************
off topic:
if you interested, in my post (Lazarus forum) you can see all codes of my project.
http://www.lazarus.freepascal.org/index ... #msg111543

***********************
and I conclude that Delphi887 has a local issue and did not encounter a bug.

Posted: 21.01.2013, 05:52
by delphi887
EgonHugeist wrote:delphi887,

issue found. open ZAbstractRODataset.pas.

Goto line 1757 and replace

Fields.Size := ResultSet.GetMetadata.GetColumnDisplaySize(I+1);
with:
Fields.DisplayWidth := ResultSet.GetMetadata.GetColumnDisplaySize(I+1);

Thanks. Patch done R2134 \testing-7.1 (SVN) will be backported to 7.0.4 soon.


Thanks EgonHugeist very much :D :D :D
i change it and recompile and every thing fine.
Zeos 7.03-stable in Kubuntu 12.10 (after change)
Image

:) :thanks:

Posted: 21.01.2013, 06:03
by delphi887
aliboy wrote: and I conclude that Delphi887 has a local issue and did not encounter a bug.
hi aliboy :)
No i change it :
Fields.Size := ResultSet.GetMetadata.GetColumnDisplaySize(I+1);
with:
Fields.DisplayWidth :=ResultSet.GetMetadata.GetColumnDisplaySize(I+1);

and The program is working properly.
:wink:

Posted: 21.01.2013, 08:47
by aliboy
hi delphi887. very nice