From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Michael Gradek <mike@busbud.com>
Cc: PostgreSQL Bugs <pgsql-bugs@postgresql.org>
Subject: Re: BUG #13440: unaccent does not remove all diacritics
Date: Thu, 18 Jun 2015 15:30:46 -0400
Message-ID: <4186.1434655846@sss.pgh.pa.us> (raw)
In-Reply-To: <CAEepm=2yw0so0ke8ZRy-qWOCrPRC2Ts0cs_6O2Zudkg=R+sR9Q@mail.gmail.com>
References: <20150614063707.2734.30270@wrigleys.postgresql.org>
<12238.1434304758@sss.pgh.pa.us>
<CAEP8ZNWBH7Lc8KeaAxbPFJAC-RUUCKfBv5xcfOjqKvf4309Esw@mail.gmail.com>
<20150615045056.GM133018@postgresql.org>
<38161.1434372933@sss.pgh.pa.us>
<CAEepm=0YVseDdN3Odjg2AZ2QvEPshqwJf=4zZbea5cwMQEP1Bw@mail.gmail.com>
<CAEepm=2XAMTA8r3V682_aNZOz1kB3MdMvymDQmO7TA0qg99GAA@mail.gmail.com>
<1790.1434492074@sss.pgh.pa.us>
<CAEepm=2yw0so0ke8ZRy-qWOCrPRC2Ts0cs_6O2Zudkg=R+sR9Q@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Thomas Munro <thomas.munro@enterprisedb.com> writes:
> On Wed, Jun 17, 2015 at 10:01 AM, Tom Lane <tgl@sss.pgh.pa.us> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, thomas.munro@enterprisedb.com, alvherre@2ndquadrant.com, mike@busbud.com
Subject: Re: BUG #13440: unaccent does not remove all diacritics
In-Reply-To: <4186.1434655846@sss.pgh.pa.us>
References: <20150614063707.2734.30270@wrigleys.postgresql.org> <12238.1434304758@sss.pgh.pa.us> <CAEP8ZNWBH7Lc8KeaAxbPFJAC-RUUCKfBv5xcfOjqKvf4309Esw@mail.gmail.com> <20150615045056.GM133018@postgresql.org> <38161.1434372933@sss.pgh.pa.us> <CAEepm=0YVseDdN3Odjg2AZ2QvEPshqwJf=4zZbea5cwMQEP1Bw@mail.gmail.com> <CAEepm=2XAMTA8r3V682_aNZOz1kB3MdMvymDQmO7TA0qg99GAA@mail.gmail.com> <1790.1434492074@sss.pgh.pa.us> <CAEepm=2yw0so0ke8ZRy-qWOCrPRC2Ts0cs_6O2Zudkg=R+sR9Q@mail.gmail.com> <4186.1434655846@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox