mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-14 09:21:03 +00:00
ICU-5198 Disable charset detection when UCONFIG_NO_CONVERSION is 1.
X-SVN-Rev: 19622
This commit is contained in:
parent
a3eec32c70
commit
5b973ae614
20 changed files with 65 additions and 5 deletions
|
@ -6,6 +6,9 @@
|
|||
*/
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#if !UCONFIG_NO_CONVERSION
|
||||
|
||||
#include "unicode/ucsdet.h"
|
||||
|
||||
#include "csdetect.h"
|
||||
|
@ -342,3 +345,5 @@ ucsdet_getAllDetectableCharsets(const UCharsetDetector *ucsd, UErrorCode *statu
|
|||
return en;
|
||||
}
|
||||
U_CDECL_END
|
||||
|
||||
#endif
|
||||
|
|
|
@ -8,9 +8,10 @@
|
|||
#ifndef __CSDETECT_H
|
||||
#define __CSDETECT_H
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
#include "unicode/uobject.h"
|
||||
|
||||
#if !UCONFIG_NO_CONVERSION
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
class InputText;
|
||||
|
@ -51,4 +52,5 @@ public:
|
|||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif
|
||||
#endif /* __CSDETECT_H */
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
*/
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#if !UCONFIG_NO_CONVERSION
|
||||
#include "unicode/unistr.h"
|
||||
#include "unicode/ucnv.h"
|
||||
|
||||
|
@ -55,3 +57,5 @@ int32_t CharsetMatch::getUChars(UChar *buf, int32_t cap, UErrorCode *status) con
|
|||
}
|
||||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif
|
||||
|
|
|
@ -8,9 +8,10 @@
|
|||
#ifndef __CSMATCH_H
|
||||
#define __CSMATCH_H
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
#include "unicode/uobject.h"
|
||||
|
||||
#if !UCONFIG_NO_CONVERSION
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
class InputText;
|
||||
|
@ -39,4 +40,5 @@ class CharsetMatch : public UMemory
|
|||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif
|
||||
#endif /* __CSMATCH_H */
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#if !UCONFIG_NO_CONVERSION
|
||||
|
||||
#include "cstring.h"
|
||||
|
||||
#include "csr2022.h"
|
||||
|
@ -167,3 +169,4 @@ CharsetRecog_2022::~CharsetRecog_2022()
|
|||
}
|
||||
|
||||
U_NAMESPACE_END
|
||||
#endif
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#if !UCONFIG_NO_CONVERSION
|
||||
|
||||
#include "csrecog.h"
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
@ -80,4 +82,5 @@ public:
|
|||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif
|
||||
#endif /* __CSR2022_H */
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#if !UCONFIG_NO_CONVERSION
|
||||
|
||||
#include "csrecog.h"
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
@ -22,3 +24,5 @@ const char *CharsetRecognizer::getLanguage() const
|
|||
}
|
||||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif
|
||||
|
|
|
@ -8,9 +8,10 @@
|
|||
#ifndef __CSRECOG_H
|
||||
#define __CSRECOG_H
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
#include "unicode/uobject.h"
|
||||
|
||||
#if !UCONFIG_NO_CONVERSION
|
||||
|
||||
#include "inputext.h"
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
@ -37,4 +38,5 @@ class CharsetRecognizer : public UMemory
|
|||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif
|
||||
#endif /* __CSRECOG_H */
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#if !UCONFIG_NO_CONVERSION
|
||||
|
||||
#include "csrmbcs.h"
|
||||
|
||||
#include <math.h>
|
||||
|
@ -512,3 +514,4 @@ int32_t CharsetRecog_gb_18030::match(InputText *det)
|
|||
}
|
||||
|
||||
U_NAMESPACE_END
|
||||
#endif
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#if !UCONFIG_NO_CONVERSION
|
||||
|
||||
#include "csrecog.h"
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
@ -199,4 +201,5 @@ public:
|
|||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif
|
||||
#endif /* __CSRMBCS_H */
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#if !UCONFIG_NO_CONVERSION
|
||||
#include "csrsbcs.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -1089,3 +1090,5 @@ int32_t CharsetRecog_KOI8_R::match(InputText *textIn)
|
|||
}
|
||||
|
||||
U_NAMESPACE_END
|
||||
#endif
|
||||
|
||||
|
|
|
@ -8,9 +8,10 @@
|
|||
#ifndef __CSRSBCS_H
|
||||
#define __CSRSBCS_H
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
#include "unicode/uobject.h"
|
||||
|
||||
#if !UCONFIG_NO_CONVERSION
|
||||
|
||||
#include "csrecog.h"
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
@ -357,4 +358,5 @@ class CharsetRecog_KOI8_R : public CharsetRecog_sbcs
|
|||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif
|
||||
#endif /* __CSRSBCS_H */
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#if !UCONFIG_NO_CONVERSION
|
||||
|
||||
#include "csrucode.h"
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
@ -140,3 +142,5 @@ int32_t CharsetRecog_UTF_32_LE::getChar(const uint8_t *input, int32_t index) con
|
|||
}
|
||||
|
||||
U_NAMESPACE_END
|
||||
#endif
|
||||
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#if !UCONFIG_NO_CONVERSION
|
||||
|
||||
#include "csrecog.h"
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
@ -100,4 +102,5 @@ public:
|
|||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif
|
||||
#endif /* __CSRUCODE_H */
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#if !UCONFIG_NO_CONVERSION
|
||||
|
||||
#include "csrutf8.h"
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
@ -106,3 +108,4 @@ int32_t CharsetRecog_UTF8::match(InputText* det) {
|
|||
}
|
||||
|
||||
U_NAMESPACE_END
|
||||
#endif
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#if !UCONFIG_NO_CONVERSION
|
||||
|
||||
#include "csrecog.h"
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
@ -36,4 +38,5 @@ class CharsetRecog_UTF8: public CharsetRecognizer {
|
|||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif
|
||||
#endif /* __CSRUTF8_H */
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#if !UCONFIG_NO_CONVERSION
|
||||
|
||||
#include "inputext.h"
|
||||
|
||||
#include "cmemory.h"
|
||||
|
@ -150,3 +152,5 @@ void InputText::MungeInput(UBool fStripTags) {
|
|||
}
|
||||
|
||||
U_NAMESPACE_END
|
||||
#endif
|
||||
|
||||
|
|
|
@ -8,9 +8,10 @@
|
|||
#ifndef __INPUTEXT_H
|
||||
#define __INPUTEXT_H
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
#include "unicode/uobject.h"
|
||||
|
||||
#if !UCONFIG_NO_CONVERSION
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
class InputText : public UMemory
|
||||
|
@ -45,4 +46,5 @@ public:
|
|||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif
|
||||
#endif /* __INPUTEXT_H */
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#if !UCONFIG_NO_CONVERSION
|
||||
#include "unicode/ucsdet.h"
|
||||
#include "csdetect.h"
|
||||
#include "csmatch.h"
|
||||
|
@ -225,3 +226,4 @@ ucsdet_getUChars(const UCharsetMatch *ucsm,
|
|||
}
|
||||
U_CDECL_END
|
||||
|
||||
#endif
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
#define __UCSDET_H
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#if !UCONFIG_NO_CONVERSION
|
||||
#include "unicode/uenum.h"
|
||||
|
||||
/**
|
||||
|
@ -341,6 +343,7 @@ ucsdet_isInputFilterEnabled(const UCharsetDetector *ucsd);
|
|||
U_DRAFT UBool U_EXPORT2
|
||||
ucsdet_enableInputFilter(UCharsetDetector *ucsd, UBool filter);
|
||||
|
||||
#endif
|
||||
#endif /* __UCSDET_H */
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue