When attempting to read from a database remotely from a client using UTF while the Database has encoding set to anything other than UTF, the attempt will fail with an error "invalid byte sequence for encoding "UTF8""
Error Message:
Invalid byte sequence for encoding "UTF-8"
With client_encoding set to UTF-8 on Greenplum and with database encoding, not UTF-8, Greenplum should automatically convert the encoding from the "not UTF-8" to UTF-8 and the Client should be able to read the data. Since the introduction of 5.x code, a bug has been introduced that disabled this feature.
This issue has been fixed in 5.8.0.