'<meta charset="iso-8859- 2">'
or
'<meta charset="iso-8859-%2">'
returns
'Error Internal encoding declaration [...] disagrees with the actual encoding of the document (utf-8).'
While invald encoding name e.g '<meta charset=iso-8859-2a>'
returns
'Error: Internal encoding declaration named an unsupported chararacter encoding iso-8859-2a.'
From the spec, both cases are invalid encoding labels.
https://encoding.spec.whatwg.org/#names-and-labels
It seems
'toNameKey' in validator.htmlparser.io.Encoding
is just skipping invalid characters.
I'm not certain 'forName' in validator.encoding.Encoding
is related or not.
'<meta charset="iso-8859- 2">'
or
'<meta charset="iso-8859-%2">'
returns
'Error Internal encoding declaration [...] disagrees with the actual encoding of the document (utf-8).'
While invald encoding name e.g '<meta charset=iso-8859-2a>'
returns
'Error: Internal encoding declaration named an unsupported chararacter encoding iso-8859-2a.'
From the spec, both cases are invalid encoding labels.
https://encoding.spec.whatwg.org/#names-and-labels
It seems
'toNameKey' in validator.htmlparser.io.Encoding
is just skipping invalid characters.
I'm not certain 'forName' in validator.encoding.Encoding
is related or not.