Postgres 8.0.1 - Blob fields are ruined
Posted: 01.12.2005, 16:20
I am using:
Unicode PosgreSQL 8.0.1 on Debian GNU/Linux 3.1
(also tested on Unicode PosgreSQL 8.0.3 MS Windows XP)
Delphi 7 and ZeosDBO to connect with the database.
This behaviour is known from the Zeos DBO 6.1.5 version. I've just checked out the latest cvs version (head) - 6.5.1, and tested for the bug occurrence: This bug appears again with every available driver (7.3, 7.4 and 8.0).
Bug reproduction:
1. Set the CLIENT_ENCODING of the PostgreSQL to ISO_8859_7, either by the sql statement: 'SET CLIENT_ENCODING TO "ISO_8859_7"' or by inserting the line 'codepage=ISO_8859_7' into the Properties strings of the TZConnection object.
2. Write a blob field
3. Try to read the blob field. The data are ruined, usually delphi exceptions are raised.
If the CLIENT_ENCODING is set to a latin codepage (such as ISO_8859_1) or to UNICODE the blob field is written without errors.
Workarround:
Temporarily change the CLIENT_ENCODING property "on the fly" to unicode before writing the blob. Finally, restore the initial encoding.
As this workarround is inconvenient in some cases, would it be soon a bug fix? Is this a known bug of ZeosDBO?
Thanking you
Stefanos Kozanis
Unicode PosgreSQL 8.0.1 on Debian GNU/Linux 3.1
(also tested on Unicode PosgreSQL 8.0.3 MS Windows XP)
Delphi 7 and ZeosDBO to connect with the database.
This behaviour is known from the Zeos DBO 6.1.5 version. I've just checked out the latest cvs version (head) - 6.5.1, and tested for the bug occurrence: This bug appears again with every available driver (7.3, 7.4 and 8.0).
Bug reproduction:
1. Set the CLIENT_ENCODING of the PostgreSQL to ISO_8859_7, either by the sql statement: 'SET CLIENT_ENCODING TO "ISO_8859_7"' or by inserting the line 'codepage=ISO_8859_7' into the Properties strings of the TZConnection object.
2. Write a blob field
3. Try to read the blob field. The data are ruined, usually delphi exceptions are raised.
If the CLIENT_ENCODING is set to a latin codepage (such as ISO_8859_1) or to UNICODE the blob field is written without errors.
Workarround:
Temporarily change the CLIENT_ENCODING property "on the fly" to unicode before writing the blob. Finally, restore the initial encoding.
As this workarround is inconvenient in some cases, would it be soon a bug fix? Is this a known bug of ZeosDBO?
Thanking you
Stefanos Kozanis