psql -c "\copy table to test.csv with CSV" - french character is wrong

From: Emi <emilu(at)encs(dot)concordia(dot)ca>
To: pgsql-sql(at)postgresql(dot)org
Subject: psql -c "\copy table to test.csv with CSV" - french character is wrong
Date: 2017-11-23 16:42:47
Message-ID: 7c6b8218-bdde-1c0a-2cbf-f817b37c2a2f@encs.concordia.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello,

Tried to run:
psql -h db1 -U u1 -d d1 -c "\copy t1 to test.csv with CSV"

Problem:
French characters are not shown correctly.

Tried:
psql -h db1 -U u1 -d d1 -c "\copy t1 to test.csv with CSV ENCODING
'UTF8' "
Got: \copy: parse error at "encoding"

Can you help how to copy french characters correctly into csv file please?

Thanks a lot.
--
. French characters show correctly in t1
. Client/server encoding: UTF8
. Cannot use super user: postgre
. Version 8.3.18

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Pierre Chevalier Géologue 2017-11-23 18:24:39 Re: psql -c "\copy table to test.csv with CSV" - french character is wrong
Previous Message Hector Vass 2017-11-23 09:05:05 Re: How to use COPY command with jsonb datatype ?