reencode_string(): introduce and use same_encoding()
[gitweb.git] / builtin / mailinfo.c
index fe128572f7780c4544d8023be2989f5e037b5bef..90b158d4f5c5b22a9493877dea6b08d568d637f9 100644 (file)
@@ -507,7 +507,7 @@ static void convert_to_utf8(struct strbuf *line, const char *charset)
                        return;
        }
 
-       if (!strcasecmp(metainfo_charset, charset))
+       if (same_encoding(metainfo_charset, charset))
                return;
        out = reencode_string(line->buf, metainfo_charset, charset);
        if (!out)