Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gYEvn-0006F7-VA for pgsql-bugs@arkaria.postgresql.org; Sat, 15 Dec 2018 18:44:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gYEvm-0008Up-Cb for pgsql-bugs@arkaria.postgresql.org; Sat, 15 Dec 2018 18:44:54 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1gYEvm-0008Ry-5m for pgsql-bugs@lists.postgresql.org; Sat, 15 Dec 2018 18:44:54 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gYEvk-0006co-2O for pgsql-bugs@lists.postgresql.org; Sat, 15 Dec 2018 18:44:53 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id wBFIimi2023238; Sat, 15 Dec 2018 13:44:48 -0500 From: Tom Lane To: Hugh Ranalli cc: Daniel Verite , Thomas Munro , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15548: Unaccent does not remove combining diacritical characters In-reply-to: References: <10200.1544713542@sss.pgh.pa.us> <5d77cc08-d582-4f83-a17f-f2c992d123a9@manitou-mail.org> <16726.1544827803@sss.pgh.pa.us> Comments: In-reply-to Hugh Ranalli message dated "Sat, 15 Dec 2018 13:08:00 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <23236.1544899488.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 15 Dec 2018 13:44:48 -0500 Message-ID: <23237.1544899488@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hugh Ranalli writes: > On Fri, 14 Dec 2018 at 17:50, Tom Lane wrote: >> Me too -- seems like that bears looking into. Perhaps the script's >> results are platform dependent -- what were you testing on? > I'm on Linux Mint 17, which is based on Ubuntu 14.04. But I don't think > that's it. The program's decisions come from the two data files, the > Unicode data set and the Latin-ASCII transliteration file. The script us= es > categories ( > ftp://ftp.unicode.org/Public/3.0-Update/UnicodeData-3.0.0.html#General%2= 0Category) > to identify letters (and now combining marks) and if they are in range, > performs a substitution. It then uses the transliteration file to find > rules for particular character substitutions (for example, that file see= ms > to handle the copyright symbol substitution). I don't see anything platf= orm > dependent in there. Hm. Something funny is going on here. When I fetch the two reference files from the URLs cited in the script, and do python2 generate_unaccent_rules.py --unicode-data-file UnicodeData.txt --l= atin-ascii-file Latin-ASCII.xml >newrules I get something that's bit-for-bit the same as what's in unaccent.rules. So there's clearly a platform difference between here and there. I'm using Python 2.6.6, which is what ships with RHEL6; have not tried it on anything newer. regards, tom lane