diff options
author | Jehan <jehan@girinstud.io> | 2021-03-22 18:15:34 +0100 |
---|---|---|
committer | Jehan <jehan@girinstud.io> | 2021-03-22 18:18:42 +0100 |
commit | f1e69d5bcf8f9fe9a0d70a803e5250284f68e3c8 (patch) | |
tree | 33cd8aa601ff6d31ac3dbe17e948d8015e7dc118 | |
parent | 06d9d1eac0d74e523891c47f295096c5baaa6be3 (diff) |
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.
-rw-r--r-- | src/nsUniversalDetector.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/nsUniversalDetector.cpp b/src/nsUniversalDetector.cpp index b143d9f..ea9a4d6 100644 --- a/src/nsUniversalDetector.cpp +++ b/src/nsUniversalDetector.cpp @@ -205,12 +205,19 @@ nsresult nsUniversalDetector::HandleData(const char* aBuf, PRUint32 aLen) if (nsnull == mCharSetProbers[1]) 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; if (nsnull == mCharSetProbers[2]) return NS_ERROR_OUT_OF_MEMORY; - } + }*/ } } else |