From 4258a5a491fd679cbef09f06192b76b5d5ad526e Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 28 May 2018 09:34:23 +0200 Subject: [PATCH] scripts/convert_to_utf8: add script to help with this. --- scripts/convert_to_utf8 | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 scripts/convert_to_utf8 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 + -- 2.47.2