00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __UCSDET_H
00022 #define __UCSDET_H
00023
00024 #include "unicode/utypes.h"
00025
00026 #if !UCONFIG_NO_CONVERSION
00027
00028 #include "unicode/localpointer.h"
00029 #include "unicode/uenum.h"
00030
00055 struct UCharsetDetector;
00060 typedef struct UCharsetDetector UCharsetDetector;
00061
00062 struct UCharsetMatch;
00068 typedef struct UCharsetMatch UCharsetMatch;
00069
00078 U_STABLE UCharsetDetector * U_EXPORT2
00079 ucsdet_open(UErrorCode *status);
00080
00090 U_STABLE void U_EXPORT2
00091 ucsdet_close(UCharsetDetector *ucsd);
00092
00093 #if U_SHOW_CPLUSPLUS_API
00094
00095 U_NAMESPACE_BEGIN
00096
00106 U_DEFINE_LOCAL_OPEN_POINTER(LocalUCharsetDetectorPointer, UCharsetDetector, ucsdet_close);
00107
00108 U_NAMESPACE_END
00109
00110 #endif
00111
00127 U_STABLE void U_EXPORT2
00128 ucsdet_setText(UCharsetDetector *ucsd, const char *textIn, int32_t len, UErrorCode *status);
00129
00130
00149 U_STABLE void U_EXPORT2
00150 ucsdet_setDeclaredEncoding(UCharsetDetector *ucsd, const char *encoding, int32_t length, UErrorCode *status);
00151
00152
00178 U_STABLE const UCharsetMatch * U_EXPORT2
00179 ucsdet_detect(UCharsetDetector *ucsd, UErrorCode *status);
00180
00181
00212 U_STABLE const UCharsetMatch ** U_EXPORT2
00213 ucsdet_detectAll(UCharsetDetector *ucsd, int32_t *matchesFound, UErrorCode *status);
00214
00215
00216
00232 U_STABLE const char * U_EXPORT2
00233 ucsdet_getName(const UCharsetMatch *ucsm, UErrorCode *status);
00234
00258 U_STABLE int32_t U_EXPORT2
00259 ucsdet_getConfidence(const UCharsetMatch *ucsm, UErrorCode *status);
00260
00290 U_STABLE const char * U_EXPORT2
00291 ucsdet_getLanguage(const UCharsetMatch *ucsm, UErrorCode *status);
00292
00293
00316 U_STABLE int32_t U_EXPORT2
00317 ucsdet_getUChars(const UCharsetMatch *ucsm,
00318 UChar *buf, int32_t cap, UErrorCode *status);
00319
00320
00321
00350 U_STABLE UEnumeration * U_EXPORT2
00351 ucsdet_getAllDetectableCharsets(const UCharsetDetector *ucsd, UErrorCode *status);
00352
00364 U_STABLE UBool U_EXPORT2
00365 ucsdet_isInputFilterEnabled(const UCharsetDetector *ucsd);
00366
00367
00379 U_STABLE UBool U_EXPORT2
00380 ucsdet_enableInputFilter(UCharsetDetector *ucsd, UBool filter);
00381
00382 #ifndef U_HIDE_INTERNAL_API
00383
00396 U_INTERNAL UEnumeration * U_EXPORT2
00397 ucsdet_getDetectableCharsets(const UCharsetDetector *ucsd, UErrorCode *status);
00398
00412 U_INTERNAL void U_EXPORT2
00413 ucsdet_setDetectableCharset(UCharsetDetector *ucsd, const char *encoding, UBool enabled, UErrorCode *status);
00414 #endif
00415
00416 #endif
00417 #endif
00418
00419