From ba42804040d9421b519edf9421a569424278c2b4 Mon Sep 17 00:00:00 2001 From: ellson Date: Tue, 15 Aug 2006 13:41:53 +0000 Subject: [PATCH] add UTF8 rtest case from b993 support charset=utf8 as synonym for charset="utf-8" add charset=latin1 to latin1 examples and rtest cases --- lib/common/input.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) 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; } -- 2.40.0