From: Greg Kroah-Hartman Date: Mon, 28 May 2018 07:34:23 +0000 (+0200) Subject: scripts/convert_to_utf8: add script to help with this. X-Git-Tag: v3.18.111~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4258a5a491fd679cbef09f06192b76b5d5ad526e;p=thirdparty%2Fkernel%2Fstable-queue.git scripts/convert_to_utf8: add script to help with this. --- diff --git a/scripts/convert_to_utf8 b/scripts/convert_to_utf8 new file mode 100755 index 00000000000..03b1a9547c2 --- /dev/null +++ b/scripts/convert_to_utf8 @@ -0,0 +1,12 @@ +#!/bin/bash + +for file in $(ls *.patch); do + ISO=$(file "${file}" | grep ISO) + if [ "${ISO}" != "" ] ; then + echo "Converting ${file}" + tmpfile=$(mktemp convert-XXXXX || exit 1) + iconv -c --to-code=UTF-8//TRANSLIT "${file}" > "${tmpfile}" + mv "${tmpfile}" "${file}" + fi +done +