From 4cf887936661a78357d19661577b3d4f819face4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20J=C3=A4ckle?= Date: Fri, 26 May 2023 11:34:09 +0200 Subject: [PATCH] univcode verbessert --- latex2utf8.sh | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/latex2utf8.sh b/latex2utf8.sh index b53f3d7..739ac59 100755 --- a/latex2utf8.sh +++ b/latex2utf8.sh @@ -47,15 +47,10 @@ fi fileType=$(file -bi "${file}") if [ "$fileType" != "text/x-tex; charset=utf-8" ]; then - #~ sed -i 's|ǎ| |g' "$file" - #U+008A = ä - #~ sed -i 's|Š|ä|g' "$file" - #U+009A=ö - #~ sed -i 's|š|ö|g' "$file" LANG=de_CH iconv -t utf-8 "${file}.raw" -o "$file" fi -sed -i 's|\\usepackage[applemac]{inputenc}|\\usepackage[utf8]{inputenc}|g' "$file" +sed -i 's|\\usepackage\[applemac\]{inputenc}|\\usepackage\[utf8\]{inputenc}|g' "$file" sed -i 's|\\"a|ä|g' "$file" sed -i 's|\\"o|ö|g' "$file" sed -i 's|\\"u|ü|g' "$file" @@ -64,15 +59,13 @@ sed -i 's|\\"O|Ö|g' "$file" sed -i 's|\\"U|Ü|g' "$file" sed -i "s|Ê| |g" "$file" sed -i "s|Õ|'|g" "$file" -sed -i "s|�|'|g" "$file" +sed -i $'s|\u007c|\'|g' "$file" sed -i $'s|\u009f|ü|g' "$file" # 9f->ü sed -i $'s|\u009a|ö|g' "$file" sed -i $'s|\u008a|ä|g' "$file" sed -i $'s|\u0086|Ü|g' "$file" sed -i $'s|\u0080|Ä|g' "$file" sed -i $'s|\u0085|Ö|g' "$file" -sed -i 's|š|ö|g' "$file" -sed -i 's|Š|ä|g' "$file" # Diese Zeilen können angepasst werden, # um gleich ein paar verbesserungen an den Dokumenten vorzunehmen