On 2/27/17 10:55, Peter Eisentraut wrote:
> It appears we need pandoc 1.13 to get the good output.  This won't be
> available until Debian stretch.

I understand that borka is updated to stretch now.  So we could give
this another try.  Updated patch attached.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From dfed8d84d1738ecca6721e97b13e86cf481aaf6c Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <pete...@gmx.net>
Date: Mon, 23 Apr 2018 10:40:17 -0400
Subject: [PATCH] Create INSTALL file using Pandoc

Replace using lynx with using pandoc.  Pandoc creates better looking
output and it avoids the delicate locale/encoding issues of lynx because
it always uses UTF-8 for both input and output.

Note: requires Pandoc >=1.13
---
 doc/src/sgml/Makefile | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/doc/src/sgml/Makefile b/doc/src/sgml/Makefile
index 74aac01c39..93b0b60cdb 100644
--- a/doc/src/sgml/Makefile
+++ b/doc/src/sgml/Makefile
@@ -100,18 +100,10 @@ errcodes-table.sgml: 
$(top_srcdir)/src/backend/utils/errcodes.txt generate-errco
 ##
 
 ICONV = iconv
-LYNX = lynx
-
-# The documentation may contain non-ASCII characters (mostly for
-# contributor names), which lynx converts to the encoding determined
-# by the current locale.  To get text output that is deterministic and
-# easily readable by everyone, we make lynx produce LATIN1 and then
-# convert that to ASCII with transliteration for the non-ASCII characters.
-# Official releases were historically built on FreeBSD, which has limited
-# locale support and is very picky about locale name spelling.  The
-# below has been finely tuned to run on FreeBSD and Linux/glibc.
+PANDOC = pandoc
+
 INSTALL: % : %.html
-       $(PERL) -p -e 's,<h(1|2) class="title",<h\1 align=center,g' $< | 
LC_ALL=en_US.ISO8859-1 $(LYNX) -force_html -dump -nolist -stdin | $(ICONV) -f 
latin1 -t us-ascii//TRANSLIT > $@
+       $(PANDOC) $< -t plain | $(ICONV) -f utf8 -t us-ascii//TRANSLIT > $@
 
 INSTALL.html: %.html : stylesheet-text.xsl %.xml
        $(XMLLINT) --noout --valid $*.xml

base-commit: 56811e57323faa453947eb82f007e323a952e1a1
-- 
2.17.0

Reply via email to