From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix unaccent generation script in Windows
Date: Tue, 10 Sep 2019 21:16:21 +0000
Message-ID: <E1i7nUr-0006Ul-Qm@gemulon.postgresql.org> (raw)
Fix unaccent generation script in Windows
As originally coded, the script would fail on Windows 10 and Python 3
because stdout would not be switched to UTF-8 only for Python 2. This
patch makes that apply to both versions.
Also add python 2 compatibility markers so that we know what to remove
once we drop support for that. Also use a "with" clause to ensure file
descriptor is closed promptly.
Author: Hugh Ranalli, Ramanarayana
Reviewed-by: Kyotaro Horiguchi
Discussion: https://postgr.es/m/CAKm4Xs7_61XMyOWmHs3n0mmkS0O4S0pvfWk=7cQ5P0gs177f7A@mail.gmail.com
Discussion: https://postgr.es/m/15548-cef1b3f8de190d4f@postgresql.org
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/0afc0a7841889c6221fd47430e72f4fe570833f4
Modified Files
--------------
contrib/unaccent/generate_unaccent_rules.py | 44 ++++++++++++++++-------------
1 file changed, 24 insertions(+), 20 deletions(-)
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-committers@postgresql.org
Cc: alvherre@alvh.no-ip.org
Subject: Re: pgsql: Fix unaccent generation script in Windows
In-Reply-To: <E1i7nUr-0006Ul-Qm@gemulon.postgresql.org>
References: <E1i7nUr-0006Ul-Qm@gemulon.postgresql.org>
* 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