ICU-8970 MungeInput when neccessary on detection instead of when text is set

X-SVN-Rev: 31065
This commit is contained in:
Michael Ow 2011-12-08 17:04:46 +00:00
parent 7d668b9068
commit 94a9854969

View File

@ -1,6 +1,6 @@
/**
*******************************************************************************
* Copyright (C) 2005-2009, International Business Machines Corporation and *
* Copyright (C) 2005-2011, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@ -88,8 +88,6 @@ public class CharsetDetector {
fRawInput = in;
fRawLength = in.length;
MungeInput();
return this;
}
@ -130,7 +128,6 @@ public class CharsetDetector {
}
fInputStream.reset();
MungeInput(); // Strip html markup, collect byte stats.
return this;
}
@ -190,6 +187,8 @@ public class CharsetDetector {
int confidence;
ArrayList<CharsetMatch> matches = new ArrayList<CharsetMatch>();
MungeInput(); // Strip html markup, collect byte stats.
// Iterate over all possible charsets, remember all that
// give a match quality > 0.
for (i=0; i<fCSRecognizers.size(); i++) {