Re: [PATCH] accept <?xml encoding='UTF-8'?>

[email protected]
Newsgroups gmane.comp.web.lynx.devel
Message-ID <[email protected]>
Quoth Mouse:
>> -		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.)

You are entirely correct.  This is one hacky parser.  It does consider 
anything prefixed with utf-8 to be equivalent to utf-8 and that 
absolutely is bad behavior.  By all means, send patches if you will.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.