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 ?
TZPostgreSQLResultSet.GetString
Moderators: gto, cipto_kh, EgonHugeist
Re: TZPostgreSQLResultSet.GetString
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
Note that EncodeString() in is characterset unaware. This unawareness encodes some multibyte characters for TEXT/VARCHAR columns incorrectly.
Regards,
CN