commit, cherry-pick -s: remove broken support for multiline rfc2822 fields
[gitweb.git] / utf8.c
diff --git a/utf8.c b/utf8.c
index 28791a7c3174924967182d54c8b4a7f9600c87bf..5c61bbe1131e7bbdd939c8b815bd5222b872e3fb 100644 (file)
--- a/utf8.c
+++ b/utf8.c
@@ -423,6 +423,13 @@ int is_encoding_utf8(const char *name)
        return 0;
 }
 
+int same_encoding(const char *src, const char *dst)
+{
+       if (is_encoding_utf8(src) && is_encoding_utf8(dst))
+               return 1;
+       return !strcasecmp(src, dst);
+}
+
 /*
  * Given a buffer and its encoding, return it re-encoded
  * with iconv.  If the conversion fails, returns NULL.