00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __UCSDET_H
00020 #define __UCSDET_H
00021
00022 #include "unicode/utypes.h"
00023
00024 #if !UCONFIG_NO_CONVERSION
00025 #include "unicode/uenum.h"
00026
00047 struct UCharsetDetector;
00052 typedef struct UCharsetDetector UCharsetDetector;
00053
00054 struct UCharsetMatch;
00060 typedef struct UCharsetMatch UCharsetMatch;
00061
00070 U_DRAFT UCharsetDetector * U_EXPORT2
00071 ucsdet_open(UErrorCode *status);
00072
00082 U_DRAFT void U_EXPORT2
00083 ucsdet_close(UCharsetDetector *ucsd);
00084
00100 U_DRAFT void U_EXPORT2
00101 ucsdet_setText(UCharsetDetector *ucsd, const char *textIn, int32_t len, UErrorCode *status);
00102
00103
00122 U_DRAFT void U_EXPORT2
00123 ucsdet_setDeclaredEncoding(UCharsetDetector *ucsd, const char *encoding, int32_t length, UErrorCode *status);
00124
00125
00151 U_DRAFT const UCharsetMatch * U_EXPORT2
00152 ucsdet_detect(UCharsetDetector *ucsd, UErrorCode *status);
00153
00154
00185 U_DRAFT const UCharsetMatch ** U_EXPORT2
00186 ucsdet_detectAll(UCharsetDetector *ucsd, int32_t *matchesFound, UErrorCode *status);
00187
00188
00189
00205 U_DRAFT const char * U_EXPORT2
00206 ucsdet_getName(const UCharsetMatch *ucsm, UErrorCode *status);
00207
00231 U_DRAFT int32_t U_EXPORT2
00232 ucsdet_getConfidence(const UCharsetMatch *ucsm, UErrorCode *status);
00233
00263 U_DRAFT const char * U_EXPORT2
00264 ucsdet_getLanguage(const UCharsetMatch *ucsm, UErrorCode *status);
00265
00266
00289 U_DRAFT int32_t U_EXPORT2
00290 ucsdet_getUChars(const UCharsetMatch *ucsm,
00291 UChar *buf, int32_t cap, UErrorCode *status);
00292
00293
00294
00315 U_DRAFT UEnumeration * U_EXPORT2
00316 ucsdet_getAllDetectableCharsets(const UCharsetDetector *ucsd, UErrorCode *status);
00317
00318
00329 U_DRAFT UBool U_EXPORT2
00330 ucsdet_isInputFilterEnabled(const UCharsetDetector *ucsd);
00331
00332
00344 U_DRAFT UBool U_EXPORT2
00345 ucsdet_enableInputFilter(UCharsetDetector *ucsd, UBool filter);
00346
00347 #endif
00348 #endif
00349
00350