Re: BUG #15347: Unaccent for greek characters does not work
Thomas Munro <thomas.munro@enterprisedb.com>
From: Thomas Munro <thomas.munro@enterprisedb.com>
To: Tasos Maschalidis <TaS.O.S@hotmail.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2018-08-23T22:16:14Z
Lists: pgsql-bugs
Attachments
- 0001-Add-Greek-characters-to-unaccent.rules.patch (application/octet-stream) patch 0001
On Fri, Aug 24, 2018 at 12:22 AM, Tasos Maschalidis <TaS.O.S@hotmail.com> wrote:
> return (codepoint.id >= ord('a') and codepoint.id <= ord('z')) or \
> (codepoint.id >= ord('A') and codepoint.id <= ord('Z')) or \
>
> (codepoint.id >= ord('α') and codepoint.id <= ord('ω')) or \
> (codepoint.id >= ord('Α') and codepoint.id <= ord('Ω'))
Thank you. Here it is in the form of a patch that I propose to commit
to PostgreSQL 12. It adds 221 lines to unaccent.rules. They look
sane to my untrained eye. Do you agree?
Example of use:
postgres=# select unaccent('Θέμα: Re: BUG #15347: Unaccent for greek ...');
unaccent
----------------------------------------------
Θεμα: Re: BUG #15347: Unaccent for greek ...
(1 row)
I wondered if the documentation might need a change, but it already
says something broad enough: "A more complete example, which is
directly useful for most European languages, can be found in
unaccent.rules, ...".
--
Thomas Munro
http://www.enterprisedb.com
Commits
-
Add Greek characters to unaccent.rules.
- 5e8d670c3135 12.0 landed