Pivotal Greenplum Database (GPDB) all 5.x versions prior to 5.8
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 the error message mentioned below.
Invalid byte sequence for encoding "UTF-8"
With client_encoding set to "UTF-8" on Greenplum and with database encoding set to "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.
- Issue tracking number is 29269
- See https://gpdb.docs.pivotal.io/530/ref_guide/character_sets.html for more information on Character Set Conversion between Server and Client