Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eZkUy-0007xF-J5 for pgsql-general@arkaria.postgresql.org; Thu, 11 Jan 2018 21:34:56 +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 1eZkUx-0002bZ-Nm for pgsql-general@arkaria.postgresql.org; Thu, 11 Jan 2018 21:34:55 +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 1eZkUx-0002bO-AB for pgsql-general@lists.postgresql.org; Thu, 11 Jan 2018 21:34:55 +0000 Received: from mail-io0-x22b.google.com ([2607:f8b0:4001:c06::22b]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eZkUs-0006g2-0s for pgsql-general@postgresql.org; Thu, 11 Jan 2018 21:34:54 +0000 Received: by mail-io0-x22b.google.com with SMTP id d11so3588674iog.5 for ; Thu, 11 Jan 2018 13:34:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=9OqyjR1fze3mBGcIVEPC1NwTNTsD/b/rC/DGNyDbWDY=; b=cyW4FFSmxEHAf77bjL/KzwgXJhAV5lHRCbKTiA62oy8T/qsnaN/E+/xN5p4t5jbtP2 5mo26TbSQHlEcwTNOqgSw2nkJqj+Cl47EfWvI9k7TumrgucYMu0Gzg9unOUXgktZ5dRi 3koj5vYdklEBpNzz7MHulmTyVwVWzKajJCYHDMRo2GJov9smvWGfYARvea8G+DveAcic WLMa4gfTzLYOuzDrUevmZEhqSVARBUA4KTAoOcFuVV3peohKYJFIfetKc9LO55+sLGc8 NAOvbAmGZH/O4bw+LBSwWTvWaMNdgZusryfiKFxGhYnWb3PRvy8y8cqCXaozT0ul8EJv /iSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=9OqyjR1fze3mBGcIVEPC1NwTNTsD/b/rC/DGNyDbWDY=; b=VLwhp3NubdTFppSwUZVqCJ1g5hRmmCmD2fg2B9gpt385sHRMbri+753Bnbg2YUDWus RDbN9DB1QCJSf9EWBSTIuLCciszfSV9YspKDNk1wkogSuBK7+y1NppzeGHz7WzM54ZbG xcQcY6tLkGGfeRFLqti3I4rVQQ0gVKR54F9swqAPHE0Gw/vubngu8R62gHDYi/h6sUxL mCQlKc48fVKLitm3G+yS7/+ZugCroKks9V8Owtz7vKpPXWcxaMEh9s92QBlh3z+IhpuR nm5vsGe30OGSxLoVgCSss1OpN0oVRHKDYW4iAKUgBMH9eV/EcfFl+aXnxZSZbIOyY7pp njPA== X-Gm-Message-State: AKwxyteAHJY/BEMUZDvoK/rWGa99tDcD46m0Nh1XEk3qnVNoCD9GOAU4 rmu1piR44eLfGSIPmtmmLjJkry4X X-Google-Smtp-Source: ACJfBosRbD9NItoVftMw52VRfIYZh1zPAvLA53SBwM4CZsK32drgQ76GHqPGB6sz1a9ccWvn97SnUw== X-Received: by 10.107.83.21 with SMTP id h21mr4472096iob.218.1515706487675; Thu, 11 Jan 2018 13:34:47 -0800 (PST) Received: from ?IPv6:2605:a601:2062:d00:dc8b:458e:37f5:cdd7? ([2605:a601:2062:d00:dc8b:458e:37f5:cdd7]) by smtp.gmail.com with ESMTPSA id t84sm11768246iod.88.2018.01.11.13.34.46 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Jan 2018 13:34:47 -0800 (PST) From: armand pirvu Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: characters converted to ??? in postgres Message-Id: <59E42D78-E9AA-404A-9836-9A474ACFDDE3@gmail.com> Date: Thu, 11 Jan 2018 15:34:16 -0600 To: "pgsql-general@postgresql.org" X-Mailer: Apple Mail (2.3273) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi all, Got the following thing : =E2=89=A0, =E2=89=A4, and =E2=89=A5 store in = the database as question marks according to one of my developers.=20 I have postgres installed on both MAC OS X and Centos 7 All locale on both point to UTF8 LANG=3Den_US.UTF-8 LC_CTYPE=3D"en_US.UTF-8" LC_NUMERIC=3D"en_US.UTF-8" LC_TIME=3D"en_US.UTF-8" LC_COLLATE=3D"en_US.UTF-8" LC_MONETARY=3D"en_US.UTF-8" LC_MESSAGES=3D"en_US.UTF-8" LC_PAPER=3D"en_US.UTF-8" LC_NAME=3D"en_US.UTF-8" LC_ADDRESS=3D"en_US.UTF-8" LC_TELEPHONE=3D"en_US.UTF-8" LC_MEASUREMENT=3D"en_US.UTF-8" LC_IDENTIFICATION=3D"en_US.UTF-8" LC_ALL=3D insert into jt1 values ('=E2=89=A4') ; This I can run either copy/paste which is case 1 (which does reproduce = the developer issue) , or have it in an sql script which case 2 On OS X: - case 1 fails testdb=3D# insert into jt1 values ('??') ; ERROR: invalid byte sequence for encoding "UTF8": 0xe2 0xa4 0x27 Note that at paste time =E2=89=A4 changed in ?? - case 2 is fine - echo -n '=E2=89=A4' |hexdump -C 00000000 e2 89 a4 |...| 00000003 On Centos: - Both cases are fine - echo -n '=E2=89=A4' |hexdump -C 00000000 e2 89 a4 |...| 00000003 http://www.fileformat.info/info/unicode/char/2264/index.htm UTF-8 (hex) 0xE2 0x89 0xA4 (e289a4) So to me the representation is fine in all cases. Also in all cases my = encoding is UTF8. I am trying to understand in OS X where does the change occur ? What is = causing the failure ?=20 In the bigger picture a developer complained about this failure and I am = fairly sure this is not a postgres issue but I need to prove it Many thanks for help -- Armand