From 2f0f5979720474ee4e5d7a802cd61c1685be8b38 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 31 May 2015 11:59:58 -0600 Subject: Enforce .pot files being UTF-8. --- Makefile | 2 +- common.mk | 2 +- src/lib/librexgettext | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index db4735f..bba0d46 100644 --- a/Makefile +++ b/Makefile @@ -54,7 +54,7 @@ $(addprefix clean-, $(packages)): clean-%: PHONY $$(addsuffix /clean, $$($$* $(addprefix pot-, $(packages)): pot-%: PHONY po/%.pot $(addprefix pot-, $(packages)): pot-%: PHONY po/%.pot $(foreach p,$(packages),po/$p.pot): po/%.pot: $$(addsuffix /everything.pot,$$($$*)) - cat $^ | msguniq -Fi > '$@' || rm -f '$@' + cat $^ | msguniq -Fi --to-code=UTF-8 > '$@' || rm -f '$@' ################################################################################ diff --git a/common.mk b/common.mk index b88ad8d..69bcc06 100644 --- a/common.mk +++ b/common.mk @@ -26,7 +26,7 @@ indent = emacs --batch $1 \ # Usage OUTPUT # Normalize a .po(t) file -pofmt = msguniq -Fi +pofmt = msguniq -Fi --to-code=UTF-8 # Usage: as a variable # relative path to `/` from $(bindir) diff --git a/src/lib/librexgettext b/src/lib/librexgettext index 17345cb..22a6df2 100755 --- a/src/lib/librexgettext +++ b/src/lib/librexgettext @@ -157,7 +157,7 @@ main() { xgettext-sh "${simple[@]}" -- "${files[@]}" xgettext-sh "${prose[@]}" -- "${files[@]}" | whitespace-collapse xgettext-flag -- "${files[@]}" - } | sed '/^\#, sh-format/d' | msguniq -Fi + } | sed '/^\#, sh-format/d' | msguniq -Fi --to-code=UTF-8 } main "$@" -- cgit v1.1-4-g5e80