Re: [PATCH] accept <?xml encoding='UTF-8'?>
Mouse <[email protected]>
| Newsgroups | gmane.comp.web.lynx.devel |
|---|---|
| Message-ID | <[email protected]> |
> - flag = !StrNCmp(t, "utf-8", 5); > + flag = !strncasecomp(t, "utf-8", 5); I haven't read the full context here, so I could be a bit off-base, but, surely using strncasecmp (or strncasecomp, whatever that is) is a bit dodgy here? You don't want "utf-8-is-stupid" to be taken as "utf-8", surely? (Not that I've ever seen the former in the wild, and I haven't actually read the spec myself, but I doubt it considers all strings beginning with UTF-8 to be equivalent to UTF-8.) In the case of UTF-8, it's less likely to be a problem in practice, but there are other cases where it's a bigger issue; for example, ISO-8859-1 and ISO-8859-14 are very different. /~\ The ASCII Mouse \ / Ribbon Campaign X Against HTML [email protected] / \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B