Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jHxX7-0000qU-DK for pgsql-general@arkaria.postgresql.org; Fri, 27 Mar 2020 22:32:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jHxX5-0007BN-Mc for pgsql-general@arkaria.postgresql.org; Fri, 27 Mar 2020 22:32:55 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jHxX5-0007BG-9x for pgsql-general@lists.postgresql.org; Fri, 27 Mar 2020 22:32:55 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jHxX2-00021O-F5 for pgsql-general@lists.postgresql.org; Fri, 27 Mar 2020 22:32:54 +0000 Received: from [192.168.127.1] (port=49729 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtp (Exim 4.92.3 (FreeBSD)) (envelope-from ) id 1jHxWy-000FDB-Nh; Fri, 27 Mar 2020 22:32:48 +0000 Received: from localhost ([127.0.0.1]:21574 helo=caithnard.riddles.org.uk) by caithnard.riddles.org.uk with esmtp (Exim 4.92.3 (FreeBSD)) (envelope-from ) id 1jHxWy-0008g4-Iy; Fri, 27 Mar 2020 22:32:48 +0000 From: Andrew Gierth To: Rory Campbell-Lange Cc: Thomas Munro , Tom Lane , Matthias Apitz , "pgsql-generallists.postgresql.org" Subject: Re: \COPY to accept non UTF-8 chars in CHAR columns In-Reply-To: <20200327221835.GA27613@campbell-lange.net> (Rory Campbell-Lange's message of "Fri, 27 Mar 2020 22:18:35 +0000") Message-ID: <87ftdta0qs.fsf@news-spur.riddles.org.uk> References: <20200327153623.GA32266@sh4-5.1blu.de> <8922.1585323994@sss.pgh.pa.us> <87k135a2hd.fsf@news-spur.riddles.org.uk> <20200327221835.GA27613@campbell-lange.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (berkeley-unix) Date: Fri, 27 Mar 2020 22:32:48 +0000 MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk >>>>> "Rory" == Rory Campbell-Lange writes: Rory> Or: Rory> iconv -f WINDOWS-1252 -t UTF-8 -c < tempfile2 > tempfile3 No. That's just a conversion of win1252 to utf8 without regard for any UTF8 that might already be present in the input. Any such input will end up double-encoded, requiring further work to fix. -- Andrew (irc:RhodiumToad)