This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
It looks like preparse() is being called twice per request; first with the commentary "Try to extract META charset" and second with "Try to extract a DOCTYPE or xmlns.". Maybe the latter should just be removed.
Two things happen between the two calls to &preparse: 1) The document is converted into UTF-8. 2) The DOCTYPE is replaced (if override is in effect). The second call to &preparse may succeede where the first failed if the document was originally in a non-"asciipatible" encoding and it needs to be done after the new DOCTYPE is inserted to pick up the new DOCTYPE (cf. Bug #47).