-int32_t CharsetRecog_2022JP::match(InputText *textIn)
-{
- return match_2022(textIn->fInputBytes, textIn->fInputLen, escapeSequences_2022JP, ARRAY_SIZE(escapeSequences_2022JP));
+UBool CharsetRecog_2022JP::match(InputText *textIn, CharsetMatch *results) const {
+ int32_t confidence = match_2022(textIn->fInputBytes,
+ textIn->fInputLen,
+ escapeSequences_2022JP,
+ ARRAY_SIZE(escapeSequences_2022JP));
+ results->set(textIn, this, confidence);
+ return (confidence > 0);