diff --git a/src/nsUTF8Prober.cpp b/src/nsUTF8Prober.cpp index 21f885e..6618bec 100644 --- a/src/nsUTF8Prober.cpp +++ b/src/nsUTF8Prober.cpp @@ -99,12 +99,13 @@ nsProbingState nsUTF8Prober::HandleData(const char* aBuf, PRUint32 aLen, float nsUTF8Prober::GetConfidence(int candidate) { - float unlike = (float)0.99; - if (mNumOfMBChar < 6) { + float unlike = 0.5f; + for (PRUint32 i = 0; i < mNumOfMBChar; i++) unlike *= ONE_CHAR_PROB; + return (float)1.0 - unlike; } else