X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=utf8.c;h=7c80eeccb4537ab6d4387941c6262c89cab30d33;hb=fc41be3b2e2eb2135e560077fc705dab7aade5f0;hp=1eedd8b61aeed9867366df0b70ac849cdef985b9;hpb=b45974a655e0e41441e5db64c091000171435096;p=git.git diff --git a/utf8.c b/utf8.c index 1eedd8b61..7c80eeccb 100644 --- a/utf8.c +++ b/utf8.c @@ -277,6 +277,15 @@ void print_wrapped_text(const char *text, int indent, int indent2, int width) } } +int is_encoding_utf8(const char *name) +{ + if (!name) + return 1; + if (!strcasecmp(name, "utf-8") || !strcasecmp(name, "utf8")) + return 1; + return 0; +} + /* * Given a buffer and its encoding, return it re-encoded * with iconv. If the conversion fails, returns NULL.