Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fuUYr-0000sa-NW for pgsql-bugs@arkaria.postgresql.org; Tue, 28 Aug 2018 03:20:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fuUYp-0002XE-Ry for pgsql-bugs@arkaria.postgresql.org; Tue, 28 Aug 2018 03:20:55 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fuUYo-0002X7-PD for pgsql-bugs@lists.postgresql.org; Tue, 28 Aug 2018 03:20:55 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fuUYf-0005yw-WB for pgsql-bugs@lists.postgresql.org; Tue, 28 Aug 2018 03:20:53 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 4A52F21F56; Mon, 27 Aug 2018 23:20:44 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 27 Aug 2018 23:20:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=T2AyeSbiCTm73xYZX8+a5C9157upbcFDhPpKydSxzbM=; b=ykFgL4ku 9JC/iGwHqKIsprfs1SD3eLXjxinZ12LitXs4J16Uv6K7OqsoVvE4l39Gz/4OcmXb 23QV6Y47aHUqDynGpqiw7Uvw1JekcXfNpfOEHtrR5EunbkuuNiceys+AGC/FTF/s 2hDq+wFYn3hN/qxP/DSwwlXMtJgfEj58ihPLUjRfaDEVsubgg7I+16fufxcBLvs1 749QAJcz4PE9iyZS0a+IfLVr6Iu8DWa+2e65otINO3Gx5fjWnzd+StnSZwVclDZf Nh4GnVl1x+SLEuRaPznM7n676t3kb4tVMbNpuZ6skZOZZP2YZ3kmX7oFiAUNpgbX XRp49ia0omSXxg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=T2AyeSbiCTm73xYZX8+a5C9157upb cFDhPpKydSxzbM=; b=a4S+8/R2gN9X06Rn/3wBPO01cepNqzA3PQvKuziItPkAZ 9VNqWd5RE/0kO/lqaWcm+N983Nact1g4e0EUBInelnmnozRc01dyvwC+o1lwR/Va EOzcNbeixGeGJ10gA32tldKKNNiFPWpfmkFMh+DCxLp7wUgvq3BexFipq9rZReco yQkwsUljw2N6+NqG0VhxOMyAe+5Warvv8dbwn1M1hdgiQwXk6CEmmjAhEZY8GMPt fEjKodC5F75TOJBL4S9NsXQFn6C/ALg9F/p6EMSD9cbypCRMeBZQChp9p/faD6m5 UdA0up30rs1VKcGkUroLvx0xtQN3dozQJaZjmn6qw== X-ME-Proxy: X-ME-Sender: Received: from paquier.xyz (unknown [66.201.48.83]) by mail.messagingengine.com (Postfix) with ESMTPA id 5F720E446D; Mon, 27 Aug 2018 23:20:42 -0400 (EDT) Date: Mon, 27 Aug 2018 20:20:40 -0700 From: Michael Paquier To: Thomas Munro Cc: Tom Lane , Tasos Maschalidis , PostgreSQL mailing lists Subject: Re: BUG #15347: Unaccent for greek characters does not work Message-ID: <20180828032040.GE29157@paquier.xyz> References: <153495048900.1368.11566580687623014380@wrigleys.postgresql.org> <20180824001239.GD30782@paquier.xyz> <25859.1535076450@sss.pgh.pa.us> <20180824113508.GI30782@paquier.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Mjqg7Yu+0hL22rav" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Mjqg7Yu+0hL22rav Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --Mjqg7Yu+0hL22rav Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAluEv4gACgkQnvQgOdby QH3JHhAAjhJzYNBRDPpSLmXiOLn5vnmczyuwCZwPJjKKdFd1mTXomRaLebQ8sP6M Wg9hQBkWXvn6+8nLDbjkjPFLSX1G1tpIRgQtVO11Upv8J4FOJz+p43m3lueYY93N rrGO6ziAXBiYmPPuN2/TJ94IAFSACqLfE1p2yDj7RImIEQ0KRoq3mBYZgmxcuJc0 0Tu8M7khl0sUoUokdzR2CGy1R7Yy5nMJ5xHLSivGYMgGW3NXqL7Xu9rp+JzloAET 4MsZnU0lwTddOstKqGD5kFadq/wXxaZKkQ3ZBHX6ZIVY/zYbCh/QMfsqF9RBKXTV iTmQwqiM+gdIF1Q8nZBOXSNlfglGb0Js97+bFF0bLHdhoZswlK1Oz4U6ehZg334k 3PUWuyQsSRbgQZLZgcSS9hRjLT88b6G+2j4PDdbh6eVzbCXO+PjUiineGq3XFTH5 mcZSIkHiwizBLdAITypIRSwqwhp+g6u4/EkjlnaiI4+kpmauhAHPv56+YLSt6YB0 pZJ8qjpGz3dv5bkDKtCAgApNc5VXA/501bg0dBNo5IHyzMDOeUx66TU0QAKwLQ5v ag/IP2dUmGeUE5DO5J3oNtg1kEGpIOKm+LBkJNxDVNbwotNueppiC7W1hTzMWCiD xGjqstYsbj9Vb8KwrwtvxpvLPRyr0bWdgbXFSMpgiC5aXXufrac= =+jmk -----END PGP SIGNATURE----- --Mjqg7Yu+0hL22rav--