From: ellson Date: Tue, 15 Aug 2006 13:41:53 +0000 (+0000) Subject: add UTF8 rtest case from b993 X-Git-Tag: LAST_LIBGRAPH~32^2~5977 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ba42804040d9421b519edf9421a569424278c2b4;p=graphviz add UTF8 rtest case from b993 support charset=utf8 as synonym for charset="utf-8" add charset=latin1 to latin1 examples and rtest cases --- diff --git a/lib/common/input.c b/lib/common/input.c index 9224da669..d98b96741 100644 --- a/lib/common/input.c +++ b/lib/common/input.c @@ -483,19 +483,24 @@ static int findCharset (graph_t * g) char* p; p = late_nnstring(g,agfindattr(g,"charset"),"utf-8"); - if (!strcasecmp(p,"latin1") || !strcasecmp(p,"ISO-8859-1") || - !strcasecmp(p,"l1") || !strcasecmp(p,"ISO_8859-1") || - !strcasecmp(p,"ISO8859-1") || !strcasecmp(p,"ISO-IR-100")) - enc = CHAR_LATIN1; - else if (!strcasecmp(p,"big-5") || !strcasecmp(p,"big5")) - enc = CHAR_BIG5; - else if (!strcasecmp(p,"utf-8")) - enc = CHAR_UTF8; + if (!strcasecmp(p,"latin-1") + || !strcasecmp(p,"latin1") + || !strcasecmp(p,"l1") + || !strcasecmp(p,"ISO-8859-1") + || !strcasecmp(p,"ISO_8859-1") + || !strcasecmp(p,"ISO8859-1") + || !strcasecmp(p,"ISO-IR-100")) + enc = CHAR_LATIN1; + else if (!strcasecmp(p,"big-5") + || !strcasecmp(p,"big5")) + enc = CHAR_BIG5; + else if (!strcasecmp(p,"utf-8") + || !strcasecmp(p,"utf8")) + enc = CHAR_UTF8; else { agerr(AGWARN, "Unsupported charset \"%s\" - assuming utf-8\n", p); enc = CHAR_UTF8; } - return enc; }