Re: BUG #15548: Unaccent does not remove combining diacritical characters
Hugh Ranalli <hugh@whtc.ca>
From: Hugh Ranalli <hugh@whtc.ca>
To: thomas.munro@enterprisedb.com
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Daniel Verite <daniel@manitou-mail.org>, pgsql-bugs@lists.postgresql.org
Date: 2018-12-18T13:01:00Z
Lists: pgsql-bugs, pgsql-hackers
On Mon, 17 Dec 2018 at 23:05, Thomas Munro <thomas.munro@enterprisedb.com> wrote: > +ʹ ' > +ʺ " > +ʻ ' > +ʼ ' > +ʽ ' > +˂ < > +˃ > > +˄ ^ > +ˆ ^ > +ˈ ' > +ˋ ` > +ː : > +˖ + > +˗ - > +˜ ~ > These aren't the combining codepoints. They're new substitutions defined in r34 of the Latin-ASCII transliteration file. I had wondered about those, too, and did some testing. I don't think this is quite right. > However, you are correct that something isn't write. In testing why I was getting a different output, I had reverted to the generate_unaccent_rules.py BEFORE my changes. And then I applied my update for the transliteration file format to the reverted version. The patch for generate_unaccent_rules should still be good, but the generated rules file didn't include the combining diacriticals. In generating that, I want to double check some of the additions before re-submitting. On Mon, 17 Dec 2018 at 23:57, Michael Paquier <michael@paquier.xyz> wrote: > 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. That makes sense. I'm happy to do that. Let me look at that file and see how extensive the other changes (encoding and removal of special characters would be). Hugh
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