src: do not test with nsLatin1Prober anymore.

Just commenting it out for now. This is just not good enough and could
take over detection when other probers have low confidence (yet
reasonable ones), returning an ugly WINDOWS-1252 with no language
detection. I think we should even just get rid of it completely. For
now, I temporarily uncomment it and will see with further experiments.
This commit is contained in:
Jehan 2021-03-22 18:15:34 +01:00
parent 6436e1dd47
commit d6c5c26150

View File

@ -205,12 +205,19 @@ nsresult nsUniversalDetector::HandleData(const char* aBuf, PRUint32 aLen)
if (nsnull == mCharSetProbers[1]) if (nsnull == mCharSetProbers[1])
return NS_ERROR_OUT_OF_MEMORY; return NS_ERROR_OUT_OF_MEMORY;
} }
if (nsnull == mCharSetProbers[2]) /* Disabling the generic WINDOWS-1252 (Latin 1) prober for now.
* We now have specific per-language models which are much more
* efficients and useful. This is where we should direct our
* efforts. Probably the whole nsLatin1Prober should disappear
* at some point, but let's keep it for now, in case this was an
* error.
*/
/* if (nsnull == mCharSetProbers[2])
{ {
mCharSetProbers[2] = new nsLatin1Prober; mCharSetProbers[2] = new nsLatin1Prober;
if (nsnull == mCharSetProbers[2]) if (nsnull == mCharSetProbers[2])
return NS_ERROR_OUT_OF_MEMORY; return NS_ERROR_OUT_OF_MEMORY;
} }*/
} }
} }
else else