Re: bug in 2nd-highest-upvoted mb_check_encoding() comment code

[email protected] (Sherif Ramadan)
Newsgroups php.doc
Message-ID <CAL+t6cGva0hT+K4zokqND7JDnX_Wfnj05be+4Ucy9eSKgri99w@mail.gmail.com>
Unfortunately this is the problem with user contributions. They are
subjective by nature as they may offer up buggy implementation or provide
inaccurate information. While this is true they are ranked by popular vote.
So feel free to down vote if you don't like what you see. However editorial
constraints on user contributions are limited unless they violate a serious
problem such as security, spam, or hate speech.

On Fri, Aug 13, 2021, 2:22 PM Hans Henrik Bergan <[email protected]>
wrote:

> the comment
> https://www.php.net/manual/en/function.mb-check-encoding.php#95289 is the
> 2nd-highest upvoted comment, and makes some dubious claims, but the code
> provided is bugged and should not be used,
> as a specific example it incorrectly validates "\xC0\x81"  , which is
> illegal  in UTF8 (quote RFC3629: The octet values C0, C1, F5 to FF never
> appear - ref https://datatracker.ietf.org/doc/html/rfc3629 )
>
> so.. can we at least get an editor's note that the code is bugged,
> incorrectly validates "\xC0\x81", and should not be used?
>
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.