| 1 |
. |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
#ifndef __CSR2022_H |
| 11 |
#define __CSR2022_H |
| 12 |
|
| 13 |
#include "unicode/utypes.h" |
| 14 |
|
| 15 |
#if !UCONFIG_NO_CONVERSION |
| 16 |
|
| 17 |
#include "csrecog.h" |
| 18 |
|
| 19 |
U_NAMESPACE_BEGIN |
| 20 |
|
| 21 |
class CharsetMatch; |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
class CharsetRecog_2022 : public CharsetRecognizer |
| 34 |
{ |
| 35 |
|
| 36 |
public: |
| 37 |
virtual ~CharsetRecog_2022() = 0; |
| 38 |
|
| 39 |
protected: |
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
int32_t match_2022(const uint8_t *text, |
| 54 |
int32_t textLen, |
| 55 |
const uint8_t escapeSequences[][5], |
| 56 |
int32_t escapeSequences_length) const; |
| 57 |
|
| 58 |
}; |
| 59 |
|
| 60 |
class CharsetRecog_2022JP :public CharsetRecog_2022 |
| 61 |
{ |
| 62 |
public: |
| 63 |
virtual ~CharsetRecog_2022JP(); |
| 64 |
|
| 65 |
const char *getName() const override; |
| 66 |
|
| 67 |
UBool match(InputText *textIn, CharsetMatch *results) const override; |
| 68 |
}; |
| 69 |
|
| 70 |
#if !UCONFIG_ONLY_HTML_CONVERSION |
| 71 |
class CharsetRecog_2022KR :public CharsetRecog_2022 { |
| 72 |
public: |
| 73 |
virtual ~CharsetRecog_2022KR(); |
| 74 |
|
| 75 |
const char *getName() const override; |
| 76 |
|
| 77 |
UBool match(InputText *textIn, CharsetMatch *results) const override; |
| 78 |
|
| 79 |
}; |
| 80 |
|
| 81 |
class CharsetRecog_2022CN :public CharsetRecog_2022 |
| 82 |
{ |
| 83 |
public: |
| 84 |
virtual ~CharsetRecog_2022CN(); |
| 85 |
|
| 86 |
const char* getName() const override; |
| 87 |
|
| 88 |
UBool match(InputText *textIn, CharsetMatch *results) const override; |
| 89 |
}; |
| 90 |
#endif |
| 91 |
|
| 92 |
U_NAMESPACE_END |
| 93 |
|
| 94 |
#endif |
| 95 |
#endif |