[PATCH] checkpatch: Make utf-8 test --strict

From: Joe Perches
Date: Fri Jul 01 2011 - 06:14:38 EST


Some patches are sent in using ISO-8859 or even Windows codepage 1252.

Make checkpatch accept these by default and only emit the "Invalid UTF-8"
message when using --strict.

Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>

---

scripts/checkpatch.pl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index b0aa2c6..313ee88 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1408,7 +1408,7 @@ sub process {
my $ptr = substr($blank, 0, length($utf8_prefix)) . "^";
my $hereptr = "$hereline$ptr\n";

- ERROR("Invalid UTF-8, patch and commit message should be encoded in UTF-8\n" . $hereptr);
+ CHK("Invalid UTF-8, patch and commit message should be encoded in UTF-8\n" . $hereptr);
}

# ignore non-hunk lines and lines being removed


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/