diff --git a/dhl.sh b/dhl.sh index 29503dd..f67c05e 100755 --- a/dhl.sh +++ b/dhl.sh @@ -1,6 +1,19 @@ #!/usr/bin/env sh -fn="dhl-ds-versendung-3.csv" + +# target filename tn="dhl-ds-versendung.csv" + +# todo: download file (its UTF-8 encoded) + +fn="dhl-ds-versendung-3.csv" +# backup cp -f "$fn" "dhl.csv" + +# replace special spaces and hyphens sed -i -e 's/[\u00A0\u202F[:space:]]+/ /g' -e 's/[\u2010\u2011\u2012\u2013\u002D]+/-/g' -e 's/[\u00AD\uFEFF]+//g' "$fn" + +# todo: convert encoding from UTF-8 to CP1252 "Windows" + +# a possibility for conversion? seems not to be reliant iconv -o "$tn" -f UTF-8 -t CP1252 "$fn" +