Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kYYto-000327-D9 for pgsql-general@arkaria.postgresql.org; Fri, 30 Oct 2020 18:13:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kYYtn-0003PQ-C9 for pgsql-general@arkaria.postgresql.org; Fri, 30 Oct 2020 18:13:15 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kYYtn-0003PI-4e for pgsql-general@lists.postgresql.org; Fri, 30 Oct 2020 18:13:15 +0000 Received: from mail.hjp.at ([212.17.106.138] helo=rorschach.hjp.at) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kYYtf-0004E8-DT for pgsql-general@lists.postgresql.org; Fri, 30 Oct 2020 18:13:11 +0000 Received: by rorschach.hjp.at (Postfix, from userid 1000) id 53A473958; Fri, 30 Oct 2020 19:13:05 +0100 (CET) Date: Fri, 30 Oct 2020 19:13:05 +0100 From: "Peter J. Holzer" To: pgsql-general@lists.postgresql.org Subject: Re: What's the best way to translate MS generated translations of user input to what the user actually typed prior to insert or update into PG backend table ? Message-ID: <20201030181305.GC20042@hjp.at> References: <9a237283-d0d6-08ac-ae6b-f224c71c19ef@minerva.info> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="f0KYrhQ4vYSV2aJu" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --f0KYrhQ4vYSV2aJu Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2020-10-30 13:51:49 -0400, David Gauthier wrote: > Next question, how does one actually replace=C2=A0the thing ? > replace(thestring,0x2026,'...')=C2=A0 > ... isn't going to fly.=C2=A0 > Working with binary values in PG isn't at the top=C2=A0of my resume :-) Either just type (or copy/paste) it: select replace('a =E2=80=A6 string =E2=80=A6', '=E2=80=A6', '...'); or use the chr() function: select replace('a =E2=80=A6 string =E2=80=A6', chr(8230), '...'); I would prefer the former as it is easier to read (as long as the characters are printable), but the latter may be easier to type. hp --=20 _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | hjp@hjp.at | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" --f0KYrhQ4vYSV2aJu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAl+cV6wACgkQ8g5IURL+ KF3zPQ/+IdLLiTy6B+TW+r1f8oSsDFPkDY4y9pCkRqpApj4r60RPBZFkw8GgOnk6 EelNR0pLbaADoPu4gbu6XLeatdNpxlx1WQlQAGp0oRPEem651rUKyRr/HZwmoM70 B70EI0QRlQzpt4ifaBpn0bjzM6MpP8vJ37RizKaH+XH46p7Fke+lUUhCqW0+9MZZ CYAYNtngVmZwzpofPazdxXsHkrCYBTx54LkXRzIC7PXMRerX8RsnMurF0A0QChM8 OdXnYAxF5xQmyLSGnDACPGB77untU+04v6Yl61Q/bBv32ZNCInr1+YXSDFgPC19P mGrj9XNdkVcF2JgpFhHrrQ35EpiBW3pO7rPMvA7N1eufTZ2PQ75stN0pz5Yd+tcr h7X3p8VUJwdtGEjBKsdKfSBFZyQSY6+/9pZqaq89SSzy2ADzrL2lkE0n8v35lvQA xE1Am8hwVzRJL5Z/3cFbqUb1hKEuUkhGcKFAw9geZoFCxd37A6b7MptUX9qt2NJx YT9bPOlcgWkluyNmt8j2WOm0+RyRR5O+5XtqLS316OFjEv6krsx+7eSSpZYaIfNB zswCutH2r9G+jyh6cLwbnnlyKP83CmE8if4LrclQ+mvbeiHXnCbT7CuvPzXBeJHM VbHqHYpDxty+Se9YpnuXGXi9PqNm7QPNbJDJckzhfNdaJQ8u1RA= =xE3b -----END PGP SIGNATURE----- --f0KYrhQ4vYSV2aJu--