I have a weird situation where \COPY command is creating files encoded in USASCII even though I specify the encoding to be LATIN1. Since I am using Amazon RDS this is the only way for me to extract data out of RDS and load into Redshift. Has anyone come across this? Any guidance on this.
Tried using PGCLIENTENCODING and setting it to LATIN1 and executed the shell script but no luck.
Per the documentation of \COPY command it pipes output of SQL to STDOUT and pipes it out to file. I was expecting to get consistent file encoding, but I am not getting which is not helping character conversion on Redshift end.