Delphi 2010 + Zeos 7 + Postgres 9.1 = utf-8

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
juliomar_m
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: 16.09.2009, 18:39
Location: Chapecó - Santa Catarina
Contact:

Delphi 2010 + Zeos 7 + Postgres 9.1 = utf-8

Post by juliomar_m »

bom dia
com a combinação acima
Delphi 2010
ZeosLib 7
Postgresql 9.1

Quando faço a gravação de em um campo varchar de um caminho ex: "C:\\Programa\\Dados\\"
ele grava no banco neste formato "C:\134\134Programa\134\134Dados\134\134"

faço uso da properties com "codepage=utf8" e tb com "client_enconding=utf8"

verifiquei que o mudança das informações estão na unit ZDbcPostgreSqlUtils.pas
na function EncodeString(const Value: string): string;

este trecho está colocando o "134"

for I := 1 to SrcLength do
begin
if SrcBuffer^ in [#0, '''', '\'] then
begin
DestBuffer[0] := '\';
DestBuffer[1] := Char(Ord('0') + (Byte(SrcBuffer^) shr 6));
DestBuffer[2] := Char(Ord('0') + ((Byte(SrcBuffer^) shr 3) and $07));
DestBuffer[3] := Char(Ord('0') + (Byte(SrcBuffer^) and $07));
Inc(DestBuffer, 4);
end
else
begin
DestBuffer^ := SrcBuffer^;
Inc(DestBuffer);
end;

mas verifiquei no mantis do zeoslib e tem um post constando como correção mas acho que essa correção causou erro

alguém usa ou sabe algo a respeito??
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

Can you tell us your issues in english please?
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
infoluck
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 27.03.2012, 13:52

Post by infoluck »

HELLO

When you save a path in postgres 9.x
placing the zeos truncates the character 134

example:

c: \ Folder \ SubFolder returns:

c: \ 134Pasta \ 134SubPasta.

Someone already has the fix for this?

Thanks
LUMORAES - BRAZIL.
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

infoluck wrote: When you save a path in postgres 9.x
Where do you post this example-path?

I know Zeos escapes the '\' to \134 becouse of some char-convertations..

was i written like 'c: \ 134Pasta \ 134SubPasta. ' in the database?
does it happen with PG7-8 too? If not then PG changed the escape-chars.

Best regards,

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

Sorry my fault.

Yes this bug is solved in my testing-egonhugeist branch. But i don't know if trunk/testing are ready here.

Best regards.
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