Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eZoWV-0005QB-2g for pgsql-general@arkaria.postgresql.org; Fri, 12 Jan 2018 01:52:47 +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 1eZoWU-0002Xu-Bz for pgsql-general@arkaria.postgresql.org; Fri, 12 Jan 2018 01:52:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eZoWU-0002Xk-1l for pgsql-general@lists.postgresql.org; Fri, 12 Jan 2018 01:52:46 +0000 Received: from mail-io0-x241.google.com ([2607:f8b0:4001:c06::241]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eZoWQ-0000ya-QH for pgsql-general@postgresql.org; Fri, 12 Jan 2018 01:52:45 +0000 Received: by mail-io0-x241.google.com with SMTP id c17so4179725iod.1 for ; Thu, 11 Jan 2018 17:52:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=tZMwYreZSlhqH275rO7+6BCnjbso3+3elufovZBQKyA=; b=L00AgrMAc71t6lgM+0VoJMEdwEA3/TkruKZJtNemUztqOTv2Xn1gp3cn8jI4kY9ANF c9rgaaEjMk/br6UtTvGtd9r1O9Y+1VBvYvQ7i3aN8tUTY+A9G2Ywn0159kt7xI69A79P 6BNBsBBjXjdiZVi4ybjm6oZfDylh9eq008sxF7vblSbNEb3JYVXoiLdGesyAUTbjk5KB iy816mtzXkTtyOwRlUbb5610Rr2LKzymq9GKhT4kxkeNjQL297pQni+eWSEE8M4oeR+1 cgtDhYWVp1kycBohb9Mgk9E0DSHj/DrnUl70cFd2jEGSmv8ntl6iCJDK4a+M44n7hIen 8HKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=tZMwYreZSlhqH275rO7+6BCnjbso3+3elufovZBQKyA=; b=hNwOc2H4o7WDkSS1amyuBN/8ZJtKqsyXDstRf25zfm66kQyNlE9MG8d2kN0leu0bDm F66sQhqK2W734UNF0wWmjGKMBPMhcMY0usbFS4s4C2GKpkMcyY9ctD5w9nEOwPIuCsW3 N/DB/KpZ7p4V6bLw4nZZsVqsBrtYICdWUvTdQC8bLIJBMSrUHEucsIQMTMQpbZyaWw5K xWnVKAfzMe1AbGkMX+KpZx1LuYEu5Hwr5qxIXCh8jG1giCEQj6D6SnmpeWgSFFeQGUnK cwLNt0uxsSBVUdy/bRGh/oX6A8Ubt6VzhMmrIX2zIqTmEDkK7jit2H5e+Xszt8vPwLtn EmOg== X-Gm-Message-State: AKwxytehoM9oMore4bW/pvF8l1ps4EtxWejUHVjiHnJSwRYO6ezENy1z fEMxDy8ugB0D6M58MHgTKb8= X-Google-Smtp-Source: ACJfBovXkKY8y/DJU6+MYRlLtFLPMXyL4GqEo4Ag3gjnB5maHQ43M68U5PCXrZzvCAyqGD85ldS/fQ== X-Received: by 10.107.104.3 with SMTP id d3mr2490457ioc.138.1515721960335; Thu, 11 Jan 2018 17:52:40 -0800 (PST) Received: from ?IPv6:2605:a601:2062:d00:7c68:42c0:766d:65d? ([2605:a601:2062:d00:7c68:42c0:766d:65d]) by smtp.gmail.com with ESMTPSA id g136sm720125ioe.4.2018.01.11.17.52.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Jan 2018 17:52:39 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: characters converted to ??? in postgres From: armand pirvu In-Reply-To: <49e0edb1-5de6-21b2-6ab4-5264aff6b661@2ndquadrant.com> Date: Thu, 11 Jan 2018 19:52:03 -0600 Cc: "pgsql-general@postgresql.org" Content-Transfer-Encoding: quoted-printable Message-Id: <2D4E91FE-E739-4775-BB4B-C5548E8E1FD0@gmail.com> References: <59E42D78-E9AA-404A-9836-9A474ACFDDE3@gmail.com> <49e0edb1-5de6-21b2-6ab4-5264aff6b661@2ndquadrant.com> To: Peter Eisentraut X-Mailer: Apple Mail (2.3273) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi Peter The -n flag worked fine on OS X. I don=E2=80=99t have this issue on = Centos. As a side question I wonder why was postgres built with libedit = instead of libreadline , just curious. Back to my developer issue , he is using what he calls a data object in = java. Apparently this is the place where this bad conversion happens, in = other words it passes to the backend the ?? characters Any similar trick I could use on the postgres jdbc driver ?=20 Will report more once I find more from him Many thanks Armand > On Jan 11, 2018, at 4:12 PM, Peter Eisentraut = wrote: >=20 > On 1/11/18 16:34, armand pirvu wrote: >> 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 ?? >=20 > This looks like something is wrong with your libedit library. Try > running psql with the -n option. If that helps, then look into = building > psql with libreadline instead. Because libedit is terrible. >=20 >> - case 2 is fine >> - echo -n '=E2=89=A4' |hexdump -C >> 00000000 e2 89 a4 |...| >> 00000003 >=20 > --=20 > Peter Eisentraut http://www.2ndQuadrant.com/ > PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services