TZPostgreSQLResultSet.GetString

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
mrepec
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 17.01.2006, 05:43

TZPostgreSQLResultSet.GetString

Post by mrepec »

it's seems that GetRawString return already decoded string - called here ZDbcPostgreSqlUtils.DecodeString doubles decoding and finnaly result is wrong, especialy when saved string conatins '\' char.... i confirm that string is saved encoded by EncodeString - mayby postgre libpq do this decode - in "pgadmin III query" 1.4.1 strings is returned also without saved "escapes"

i have this on pg 8.0 and pg 8.1 on windows - zeos compiled from cvs with d2005 and d2006

when i change :
function TZPostgreSQLResultSet.GetString(ColumnIndex: Integer): String;
begin
Result := GetRawString(ColumnIndex);
end;
all strings are returned correctly

it's occur only on mine installation ?
giggino
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 08.11.2005, 17:55

Post by giggino »

i was writing to post the same problem as you. i get the error with pg 8.0, delphi7, windows xp with the cvs version as to 13/10/2005.

now that i know how you corrected the problem, i'm going to modify my source and recompile.

hope the problem to be corrected in next versions of the lib.

thank you
cnliou
Zeos Dev Team
Zeos Dev Team
Posts: 31
Joined: 11.11.2005, 12:18

Re: TZPostgreSQLResultSet.GetString

Post by cnliou »

Please try cvs version and let us know if it is still not working correctly.

Note that EncodeString() in is characterset unaware. This unawareness encodes some multibyte characters for TEXT/VARCHAR columns incorrectly.

Regards,

CN
Michael
ZeosLib's Handyman :o)
ZeosLib's Handyman :o)
Posts: 189
Joined: 15.08.2005, 16:08
Location: Wehrheim
Contact:

Post by Michael »

Hi,

cvs version will also fail. We are currently working on a solution to solve this problem.

Regards.
:prog2: Use the source, dude!

[align=right]..::.. ZeosLib on SourceForge ..::..[/align]
Post Reply