Created
December 17, 2018 11:07
-
-
Save ennorehling/c6637e7c06cbb1e73e27720537169f1a to your computer and use it in GitHub Desktop.
Source encoding fixer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
while [ ! -z $1 ] ; do | |
tmpfile=$(mktemp eressea.XXX) | |
iconv -f latin1 -t utf-8 < $1 | \ | |
perl -pe 's/ß/ss/; s/ä/ae/; s/ü/ue/; s/ö/oe/;' \ | |
> $tmpfile && \mv $tmpfile $1 | |
shift 1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment