Re: BUG #15548: Unaccent does not remove combining diacritical characters
Daniel Verite <daniel@manitou-mail.org>
From: "Daniel Verite" <daniel@manitou-mail.org>
To: "Tom Lane" <tgl@sss.pgh.pa.us>
Cc: hugh@whtc.ca,pgsql-bugs@lists.postgresql.org
Date: 2018-12-13T16:26:48Z
Lists: pgsql-bugs, pgsql-hackers
Tom Lane wrote: > 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. In that case, this could be achieved by simply appending the diacriticals themselves to unaccent.rules, since replacement of a string by an empty string is already supported as a rule. It doesn't seem like the current file has any of these, but from https://www.postgresql.org/docs/11/unaccent.html : "Alternatively, if only one character is given on a line, instances of that character are deleted; this is useful in languages where accents are represented by separate characters" Incidentally we may want to improve this bit of doc to mention explicitly the Unicode decomposed forms as a use case for removing characters. In fact I wonder if that's not what it's already trying to express, but confusing "languages" with "forms". Best regards, -- Daniel Vérité PostgreSQL-powered mailer: http://www.manitou-mail.org Twitter: @DanielVerite
Commits
-
Fix unaccent generation script in Windows
- 0afc0a784188 13.0 landed
-
Add combining characters to unaccent.rules.
- 456e3718e7b7 12.0 landed
-
Update unaccent rules with release 34 of CLDR for Latin-ASCII.xml
- e1c1d5444e43 12.0 landed
-
unaccent: Make generate_unaccent_rules.py Python 3 compatible
- 3d59da9ccdb9 12.0 landed
-
Convert unaccent tests to UTF-8
- b6f3649bba98 12.0 landed