From 8305d2cfa799ab2362fa5d8d75487db038ea6ce8 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 5 Apr 2020 17:42:34 +0300 Subject: [PATCH] Fix: Ignore conversion errors in `iconv` --- Makefile | 2 +- make-files | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3583e98..de032c0 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ umask 022; cheetah compile --encoding=koi8-r --settings='encoding="koi8-r"' --nobackup $< && compyle $@ && chmod +x $@ %.html: %.tmpl - umask 022; PYTHONPATH=. PYTHONIOENCODING=koi8-r:replace cheetah fill --encoding=koi8-r --settings='encoding="koi8-r"' --nobackup --stdout $< | iconv -f utf-8 -t koi8-r >$@ + umask 022; PYTHONPATH=. PYTHONIOENCODING=koi8-r:replace cheetah fill --encoding=koi8-r --settings='encoding="koi8-r"' --nobackup --stdout $< | iconv -c -f utf-8 -t koi8-r >$@ .PHONY: fast diff --git a/make-files b/make-files index 5c736ea..ca1ac09 100755 --- a/make-files +++ b/make-files @@ -15,7 +15,7 @@ for tmpl in "$@"; do outfile="`basename \"$tmpl\" .tmpl`.html" echo "$tmpl => $dir/$outfile" cheetah fill --encoding=koi8-r --settings='encoding="koi8-r"' \ - --nobackup --stdout "$tmpl" | iconv -f utf-8 -t koi8-r >"$dir/$outfile" || exit 1 + --nobackup --stdout "$tmpl" | iconv -c -f utf-8 -t koi8-r >"$dir/$outfile" || exit 1 done exec sitemap_gen.py --config=sitemaps/phdru.name-config.xml -- 2.39.2