pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Tasos Maschalidis <TaS.O.S@hotmail.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #15347: Unaccent for greek characters does not work
Date: Mon, 27 Aug 2018 20:20:40 -0700
Message-ID: <20180828032040.GE29157@paquier.xyz> (raw)
In-Reply-To: <CAEepm=0ar4rWZBb85GCJxtHtrM2nYzpFJQTBhuE6BtPtW88i6g@mail.gmail.com>
References: <153495048900.1368.11566580687623014380@wrigleys.postgresql.org>
	<CAEepm=3a_5y+COG6AM0UFZXb4MQmxSdpQK3oGnri1kaP+Uqx5A@mail.gmail.com>
	<VI1PR01MB38537EBD529FE5EE3FE9A5FEB5370@VI1PR01MB3853.eurprd01.prod.exchangelabs.com>
	<CAEepm=0RUhOuvQs2LQnFYzR4GWHtn6wUT9UaKi+vC0erKW4=dw@mail.gmail.com>
	<20180824001239.GD30782@paquier.xyz>
	<CAEepm=0On-bBVGs3TkT-wbxjXDNw8d487XMy1R0_Rm=ytZ5eJA@mail.gmail.com>
	<25859.1535076450@sss.pgh.pa.us>
	<CAEepm=3bFBfv9CBC1r+n7_TsrsWY_JxFqAsUKUozKDvcbstdhw@mail.gmail.com>
	<20180824113508.GI30782@paquier.xyz>
	<CAEepm=0ar4rWZBb85GCJxtHtrM2nYzpFJQTBhuE6BtPtW88i6g@mail.gmail.com>

On Tue, Aug 28, 2018 at 10:50:38AM +1200, Thomas Munro wrote:
> Fair criticism, here's a version with comments.

Thanks, that's way better in my opinion.  In the range of fancy things,
I have discovered today the python module unicodedata which can replace
for example 0x03b1 with ord("\N{GREEK SMALL LETTER ALPHA}"), leading to
perhaps more readable code.

Jokes apart, I would have preferred if you used directly the unicode
points as those are easier to look after in UnicodeData.txt, say
'\u03B1' for small alpha.  If you want to go with the hex code, it would
be a better reference to copy/paste directly the character name from
UnicodeData.txt as those are easier to search in the future, perhaps
with their unicode points:
- GREEK SMALL LETTER ALPHA
- GREEK SMALL LETTER OMEGA
- GREEK CAPITAL LETTER ALPHA
- GREEK CAPITAL LETTER OMEGA

Running generate_unaccent_rules.py, I get the same result for
unaccent.rules as you do.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (16+ messages)  latest in thread

Message-ID: <20180828032040.GE29157@paquier.xyz>
Permalink:  ../20180828032040.GE29157@paquier.xyz/
Also on:    postgresql.org/message-id/20180828032040.GE29157@paquier.xyz

 · 

reply

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: michael@paquier.xyz, thomas.munro@enterprisedb.com, tgl@sss.pgh.pa.us, TaS.O.S@hotmail.com
  Subject: Re: BUG #15347: Unaccent for greek characters does not work
  In-Reply-To: <20180828032040.GE29157@paquier.xyz>
  References: <153495048900.1368.11566580687623014380@wrigleys.postgresql.org> <CAEepm=3a_5y+COG6AM0UFZXb4MQmxSdpQK3oGnri1kaP+Uqx5A@mail.gmail.com> <VI1PR01MB38537EBD529FE5EE3FE9A5FEB5370@VI1PR01MB3853.eurprd01.prod.exchangelabs.com> <CAEepm=0RUhOuvQs2LQnFYzR4GWHtn6wUT9UaKi+vC0erKW4=dw@mail.gmail.com> <20180824001239.GD30782@paquier.xyz> <CAEepm=0On-bBVGs3TkT-wbxjXDNw8d487XMy1R0_Rm=ytZ5eJA@mail.gmail.com> <25859.1535076450@sss.pgh.pa.us> <CAEepm=3bFBfv9CBC1r+n7_TsrsWY_JxFqAsUKUozKDvcbstdhw@mail.gmail.com> <20180824113508.GI30782@paquier.xyz> <CAEepm=0ar4rWZBb85GCJxtHtrM2nYzpFJQTBhuE6BtPtW88i6g@mail.gmail.com> <20180828032040.GE29157@paquier.xyz>

* 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