+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
**********************************************************************
- * Copyright (C) 2005-2006, International Business Machines
+ * Copyright (C) 2005-2015, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*/
U_NAMESPACE_BEGIN
+class CharsetMatch;
+
/**
* class CharsetRecog_2022 part of the ICU charset detection imlementation.
* This is a superclass for the individual detectors for
* @param escapeSequences the byte escape sequences to test for.
* @return match quality, in the range of 0-100.
*/
- int32_t match_2022(const uint8_t *text, int32_t textLen, const uint8_t escapeSequences[][5], int32_t escapeSequences_length);
+ int32_t match_2022(const uint8_t *text,
+ int32_t textLen,
+ const uint8_t escapeSequences[][5],
+ int32_t escapeSequences_length) const;
};
class CharsetRecog_2022JP :public CharsetRecog_2022
{
-public:
- virtual ~CharsetRecog_2022JP() {}
+public:
+ virtual ~CharsetRecog_2022JP();
const char *getName() const;
- int32_t match(InputText *textIn);
+ UBool match(InputText *textIn, CharsetMatch *results) const;
};
+#if !UCONFIG_ONLY_HTML_CONVERSION
class CharsetRecog_2022KR :public CharsetRecog_2022 {
-public:
- virtual ~CharsetRecog_2022KR() {}
+public:
+ virtual ~CharsetRecog_2022KR();
const char *getName() const;
- int32_t match(InputText *textIn);
+ UBool match(InputText *textIn, CharsetMatch *results) const;
};
class CharsetRecog_2022CN :public CharsetRecog_2022
{
-public:
- virtual ~CharsetRecog_2022CN() {}
+public:
+ virtual ~CharsetRecog_2022CN();
const char* getName() const;
- int32_t match(InputText *textIn);
+ UBool match(InputText *textIn, CharsetMatch *results) const;
};
+#endif
U_NAMESPACE_END