Simplify a bit the special rules generating unaccent.rules
authorMichael Paquier <michael@paquier.xyz>
Tue, 5 Jul 2022 07:17:51 +0000 (16:17 +0900)
committerMichael Paquier <michael@paquier.xyz>
Tue, 5 Jul 2022 07:17:51 +0000 (16:17 +0900)
commite3dd7c06e62774628e102c3cd47ee46e85519de7
treeb729dea00a5341c81fe42bdb329109da7883b58c
parent84ad713cf85aeffee5dd39f62d49a1b9e34632da
Simplify a bit the special rules generating unaccent.rules

As noted by Thomas Munro, CLDR 36 has added SOUND RECORDING COPYRIGHT
(U+2117), and we use CLDR 41, so this can be removed from the set of
special cases.

The set of regression tests is expanded for degree signs, which are two
of the special cases, and a fancy case with U+210C in Latin-ASCII.xml
that we have discovered about when diving into what could be done for
Cyrillic characters (this last part is material for a future patch, not
tackled yet).

While on it, some of the assertions of generate_unaccent_rules.py are
expanded to report the codepoint on which a failure is found, something
useful for debugging.

Extracted from a larger patch by the same author.

Author: Przemysław Sztoch
Discussion: https://postgr.es/m/8478da0d-3b61-d24f-80b4-ce2f5e971c60@sztoch.pl
contrib/unaccent/expected/unaccent.out
contrib/unaccent/generate_unaccent_rules.py
contrib/unaccent/sql/unaccent.sql