Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHwhE-0003JQ-5u for pgsql-sql@arkaria.postgresql.org; Thu, 23 Nov 2017 18:58:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHwhD-0007rj-Fx for pgsql-sql@arkaria.postgresql.org; Thu, 23 Nov 2017 18:57:59 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eHwhD-0007rZ-77 for pgsql-sql@lists.postgresql.org; Thu, 23 Nov 2017 18:57:59 +0000 Received: from oldperseverance.encs.concordia.ca ([132.205.96.92]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1eHwh9-0002RG-UE for pgsql-sql@postgresql.org; Thu, 23 Nov 2017 18:57:57 +0000 Received: from cacao.encs.concordia.ca (emilu@cacao.encs.concordia.ca [132.205.47.225]) by oldperseverance.encs.concordia.ca (envelope-from emilu@encs.concordia.ca) (8.13.7/8.13.7) with ESMTP id vANIvqbw021356; Thu, 23 Nov 2017 13:57:52 -0500 Reply-To: emilu@encs.concordia.ca Subject: Re: psql -c "\copy table to test.csv with CSV" - french character is wrong References: <7c6b8218-bdde-1c0a-2cbf-f817b37c2a2f@encs.concordia.ca> <0fab017c-ada9-e64f-a889-57e868c35230@free.fr> To: =?UTF-8?Q?Pierre_Chevalier_G=c3=a9ologue?= , pgsql-sql@postgresql.org From: Emi Message-ID: Date: Thu, 23 Nov 2017 13:57:52 -0500 User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <0fab017c-ada9-e64f-a889-57e868c35230@free.fr> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.58 on oldperseverance.encs.concordia.ca at 2017-11-23 13:57:52 EST List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > sql2csv "SELECT DISTINCT opid, year FROM public.field_observations > ORDER BY year LIMIT 10" > /tmp/rien.csv > Ok. Will use stdout then. Thanks. -- psql -c "copy t1 to STDOUT with CSV" >! test.csv