mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-27 07:58:49 +01:00
assume dict is utf8-encoded but check and fail if it isn't
This commit is contained in:
parent
a22f50f2f6
commit
beaa7ba5a5
1 changed files with 2 additions and 2 deletions
|
@ -27,11 +27,11 @@ include ../Makefile.langcommon
|
|||
SOURCEDICT ?= $(XWDICTPATH)/German/HansGerman.dict.gz
|
||||
|
||||
$(XWLANG)Main.dict.gz: $(SOURCEDICT) Makefile
|
||||
file -z $(SOURCEDICT) | grep -q 'UTF-8 Unicode text' || exit 1
|
||||
zcat $< \
|
||||
| iconv -f iso88591 -t utf8 \
|
||||
| sed 's,.,\U\0,g' \
|
||||
| sed -e 's/ß/SS/g' \
|
||||
| grep '^[A-ZÄÖÜ]*$$' \
|
||||
| grep '^[AÄBCDEFGHIJKLMNOÖPQRSTUÜVWXYZ]*$$' \
|
||||
| gzip -c > $@
|
||||
|
||||
# Everything but creating of the Main.dict file is inherited from the
|
||||
|
|
Loading…
Add table
Reference in a new issue