Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Z5fWg-0003P3-Ka for pgsql-bugs@arkaria.postgresql.org; Thu, 18 Jun 2015 19:31:02 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Z5fWf-0008Fo-IL for pgsql-bugs@arkaria.postgresql.org; Thu, 18 Jun 2015 19:31:01 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Z5fWe-0008Fi-Lu for pgsql-bugs@postgresql.org; Thu, 18 Jun 2015 19:31:00 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1Z5fWZ-0001Ma-F9 for pgsql-bugs@postgresql.org; Thu, 18 Jun 2015 19:30:56 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t5IJUku2001325; Thu, 18 Jun 2015 15:30:46 -0400 From: Tom Lane To: Thomas Munro cc: Alvaro Herrera , Michael Gradek , PostgreSQL Bugs Subject: Re: BUG #13440: unaccent does not remove all diacritics In-reply-to: References: <20150614063707.2734.30270@wrigleys.postgresql.org> <12238.1434304758@sss.pgh.pa.us> <20150615045056.GM133018@postgresql.org> <38161.1434372933@sss.pgh.pa.us> <1790.1434492074@sss.pgh.pa.us> Comments: In-reply-to Thomas Munro message dated "Wed, 17 Jun 2015 13:25:53 +1200" Date: Thu, 18 Jun 2015 15:30:46 -0400 Message-ID: <4186.1434655846@sss.pgh.pa.us> X-Pg-Spam-Score: -2.2 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Thomas Munro writes: > On Wed, Jun 17, 2015 at 10:01 AM, Tom Lane wrote: >> I'm really dubious that we should be translating those ligatures at >> all (since the standard file is only advertised to do "unaccenting"), >> and if we do translate them, shouldn't they convert to AE, ae, etc? > Perhaps these conversions are intended only for comparisons, full text > indexing etc but not showing the converted text to a user, in which > case it doesn't matter too much if the conversions are a bit weird > (œuf and oeuf are interchangeable in French, but euf is nonsense). > But can we actually change them? That could cause difficulty for > users with existing unaccented data stored/indexed... But I suppose > even adding new mappings could cause problems. Yeah, if we do anything other than adding new mappings, I suspect that part could not be back-patched. Maybe adding new mappings shouldn't be back-patched either, though it seems relatively safe to me. > Right, that does seem a little bit weak. Instead of making > assumptions about the format of those names, we could make use of the > precomposed -> composed character mappings in the file. We could look > for characters in the "letters" category where there is decomposition > information (ie combining characters for the individual accents) and > the base character is [a-zA-Z]. See attached. This produces 411 > mappings (including the 14 extras). I didn't spend the time to figure > out which 300 odd characters were dropped but I noticed that our > Romanian characters of interest are definitely in. I took a quick look at this list and it seems fairly sane as far as the automatically-generated items go, except that I see it hits a few LIGATURE cases (including the existing ij cases, but also fi fl and ffl). I'm still quite dubious that that is appropriate; at least, if we do it I think we should be expanding out to the equivalent multi-letter form, not simply taking one of the letters and dropping the rest. Anybody else have an opinion on how to handle ligatures? The manually added special cases don't look any saner than they did before :-(. Anybody have an objection to removing those (except maybe dotless i) in HEAD? regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs