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 1gXSYj-00009i-Ok for pgsql-bugs@arkaria.postgresql.org; Thu, 13 Dec 2018 15:05:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gXSYh-00043T-Pu for pgsql-bugs@arkaria.postgresql.org; Thu, 13 Dec 2018 15:05:51 +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 1gXSYh-00041n-Fz for pgsql-bugs@lists.postgresql.org; Thu, 13 Dec 2018 15:05:51 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gXSYa-0006Mg-9T for pgsql-bugs@lists.postgresql.org; Thu, 13 Dec 2018 15:05:49 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id wBDF5gVP010201; Thu, 13 Dec 2018 10:05:42 -0500 From: Tom Lane To: "Daniel Verite" cc: hugh@whtc.ca, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15548: Unaccent does not remove combining diacritical characters In-reply-to: <769f5b7c-42c6-435a-a062-a728891b7d81@manitou-mail.org> References: <769f5b7c-42c6-435a-a062-a728891b7d81@manitou-mail.org> Comments: In-reply-to "Daniel Verite" message dated "Thu, 13 Dec 2018 14:19:51 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <10199.1544713542.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Thu, 13 Dec 2018 10:05:42 -0500 Message-ID: <10200.1544713542@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk "Daniel Verite" writes: > PG Bug reporting form wrote: >> ... For example, A >> followed by U+0300 displays À. However, unaccent is not removing >> these accents. > Short of having the input normalized by the application, ISTM that the > best solution would be to provide functions to do it in Postgres, so > you'd just write for example: > unaccent(unicode_NFC(string)) That might be worthwhile, but it seems independent of this issue. > Otherwise unaccent.rules can be customized. You may add replacements > for letter+diacritical sequences that are missing for the languages > you have to deal with. But doing it in general for all diacriticals > multiplied by all base characters seems unrealistic. Hm, I thought the OP's proposal was just to make unaccent drop combining diacriticals independently of context, which'd avoid the combinatorial-growth problem. regards, tom lane