Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 811f1ce

Browse files
committed
Produce HISTORY file consistently as ASCII
The release notes may contain non-ASCII characters (for contributor names), which lynx converts to the encoding determined by the current locale. The get 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.
1 parent 2ed81eb commit 811f1ce

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

doc/src/sgml/Makefile

+10-1
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,19 @@ postgres.pdf:
206206
##
207207

208208
JADE.text = $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) $(CATALOG) -d stylesheet.dsl -i output-text -t sgml
209+
ICONV = iconv
209210
LYNX = lynx
210211

212+
# The release notes may contain non-ASCII characters (for contributor
213+
# names), which lynx converts to the encoding determined by the
214+
# current locale. The get output that is deterministic and easily
215+
# readable by everyone, we make lynx produce LATIN1 and then convert
216+
# that to ASCII with transliteration for the non-ASCII characters.
217+
# Official releases are currently built on FreeBSD, which has limited
218+
# locale support and is very picky about locale name spelling. The
219+
# below has been finely tuned to run on FreeBSD and Linux/glibc.
211220
INSTALL HISTORY regress_README: % : %.html
212-
$(PERL) -p -e 's/<H(1|2)$$/<H\1 align=center/g' $< | $(LYNX) -force_html -dump -nolist -stdin > $@
221+
$(PERL) -p -e 's/<H(1|2)$$/<H\1 align=center/g' $< | LC_ALL=en_US.ISO8859-1 $(LYNX) -force_html -dump -nolist -stdin | $(ICONV) -f latin1 -t us-ascii//TRANSLIT > $@
213222

214223
INSTALL.html: standalone-install.sgml installation.sgml version.sgml
215224
$(JADE.text) -V nochunks standalone-install.sgml installation.sgml > $@

0 commit comments

Comments
 (0)