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.89) (envelope-from ) id 1gZ7Ra-0000ou-8R for pgsql-bugs@arkaria.postgresql.org; Tue, 18 Dec 2018 04:57:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gZ7RY-0002SH-Uw for pgsql-bugs@arkaria.postgresql.org; Tue, 18 Dec 2018 04:57:20 +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 1gZ7RX-0002Lc-1N for pgsql-bugs@lists.postgresql.org; Tue, 18 Dec 2018 04:57:20 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gZ7RT-0000v1-BK for pgsql-bugs@lists.postgresql.org; Tue, 18 Dec 2018 04:57:17 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 0710C22AD7; Mon, 17 Dec 2018 23:57:14 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 17 Dec 2018 23:57:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=wxUekIqJlKe48Je7MzzpxiqVT7h LTUSP6PuVk62APvs=; b=qKMcADQemGJP7mD9qOVtu7BbHO10HpN/Sfn2gviVDmN QaqnmOQJJKAGBq4YSq69eN+lQSPaFboqgKvJMJDkCah5RROgbOZZD329EqHQdbj4 hJeFxntzzy9y+lZGFaMh7kR+6cHsMaxaukkvL8hKdzlCpxr1R/dIJvbAp7CcVzBR 5dFmip87aGBfDN8aECnFRGlEBPsv/v2xgj2P9fAcTuFur7ZYUT1OmpWRkM43zF4w rJ+pgcAV/FfeD2LF2DVEuPD+4vjQuq5JNbNRrIjcnC7yH9TPDnU8KXPXCNhQ64Gf UW60r+cJPsL/oglpokLozcto+q064fKeb3c6aHlw1tw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=wxUekI qJlKe48Je7MzzpxiqVT7hLTUSP6PuVk62APvs=; b=PDIDjzsRph/DWBsVpccDLX mMPcqDHtNpMJlZgKTPvVzvIVp2akUN5Ra8+xpRk3o1n3SG3KOojXD6kEBhzOPCRs tlv60kRVeMZP7qzbTIwNZ3JoVYdZh6/EHkv1C0F4KD5sbcMzjpLPNHZainVbp/Dz VbtOE2Zs5PhknHDl3ldS0NvQxfxR9I6SqA+wuxavVKK8eCkiZhDuCWaN4gEIePOm PjYMKAxlYwhbXh8ppIM7IKGsrxaHVeAYNJQD4hIgpU+x7l2id07qfcW6ojP8q3i9 Qt7iHRa9EIhC/GutSqSiQbY+DFxZjIKi218r12a4rJ8oRrPQ6qNNv5VyAm4F1x3g == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtkedrudeigedgjeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhhtnecuuegrihhlohhuthemucef tddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculdejtd dmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttdejnecuhfhrohhmpefoihgt hhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqne cukfhppeeiuddrvdduhedrudefjedrudeivdenucfrrghrrghmpehmrghilhhfrhhomhep mhhitghhrggvlhesphgrqhhuihgvrhdrgiihiienucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from paquier.xyz (c137162.net61215.cablenet.ne.jp [61.215.137.162]) by mail.messagingengine.com (Postfix) with ESMTPA id E09C110085; Mon, 17 Dec 2018 23:57:10 -0500 (EST) Date: Tue, 18 Dec 2018 13:57:08 +0900 From: Michael Paquier To: Thomas Munro Cc: hugh@whtc.ca, Tom Lane , daniel@manitou-mail.org, PostgreSQL mailing lists Subject: Re: BUG #15548: Unaccent does not remove combining diacritical characters Message-ID: <20181218045708.GI1532@paquier.xyz> References: <23237.1544899488@sss.pgh.pa.us> <29419.1544908811@sss.pgh.pa.us> <31564.1545078667@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="KrHCbChajFcK0yQE" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --KrHCbChajFcK0yQE Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 18, 2018 at 03:05:00PM +1100, Thomas Munro wrote: > I don't think this is quite right. Those don't seem to be the > combining codepoints[1], and in any case they are being replaced with > ASCII characters, whereas I thought we wanted to replace them with > nothing at all. Here is my attempt to come up with a test case using > combining characters: >=20 > select unaccent('un cafe=CC=81 cre=CC=80me s''il vous plai=CC=82t'); >=20 > It's not stripping the accents. I've attached that in a file for > reference so you can run it with psql -f x.sql, and you can see that > it's using combining code points (code points 0301, 0300, 0302 which > come out as cc81, cc80, cc82 in UTF-8) like so: Could you also add some tests in contrib/unaccent/sql/unaccent.sql at the same time? That would be nice to check easily the extent of the patches proposed on this thread. -- Michael --KrHCbChajFcK0yQE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlwYfiQACgkQnvQgOdby QH1QCg/+MlB6AjEQA4BLoplsbhjD13Bn24N+rle+x5e1oJYLxNzqTxeI5/0dCAGL sa4Xqr6vieJhxaRn7n7CcR5qpzweGys9DBdta80W9F5swmXC+A/QB9s0RjrRpZv0 DO8t7bDh90t4/ia+Y1U8K9E106cVclMOt9KJihRUoBEXXxRttd+/dTqDWlhyu7ol PbzUVIxkYJstOrSaRnSb8dNkGFGz7P2Ix2l6M4rscJj21PDDoLkrhAe77RKLRBoP kDD05eYw5WxSMTA1ikLZwNztnem8Xog46t1MUq8AijsmlcWI/AcXg5SzLklBEe6Q Xya7sPRdoE20pcA/RM9UUUoPvrhmfc0eZe37lPmD528Ts/4V/NqwjMUQYSXHB3eg Fg/DaGGy8YvNDKZ6GK15cbBPWP/qBAVDb7MxwM/BCyOx0tAfm3Xmj6IDArJ1qti+ EcMj+T9s9JuHlceMy5ZQZBz2WAY7giB/cg2F1g76Cf6WBZK5TDB+H5TQ1Gvnxa3i PuQygKrkBGtjss7n38/Nwe6WlsD458J9nNU/oC4Jfdn/B+3DdnPRFhPiiOqwKJRp okA6psk1wsVqRnWr+0y7CzjrGY83G7RI51r+J2HvSt07EGdxEBmxwP9Y3rwKanxF QXLIoRJHdeRzux0txLbB/hv3RQV/DlEuErnMoUxrf5wSF3QCwKY= =uA4B -----END PGP SIGNATURE----- --KrHCbChajFcK0yQE--