ICU 54.1 54.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ucsdet.h
Go to the documentation of this file.
1 /*
2 **********************************************************************
3 * Copyright (C) 2005-2013, International Business Machines
4 * Corporation and others. All Rights Reserved.
5 **********************************************************************
6 * file name: ucsdet.h
7 * encoding: US-ASCII
8 * indentation:4
9 *
10 * created on: 2005Aug04
11 * created by: Andy Heninger
12 *
13 * ICU Character Set Detection, API for C
14 *
15 * Draft version 18 Oct 2005
16 *
17 */
18
19 #ifndef __UCSDET_H
20 #define __UCSDET_H
21
22 #include "unicode/utypes.h"
23
24 #if !UCONFIG_NO_CONVERSION
25
26 #include "unicode/localpointer.h"
27 #include "unicode/uenum.h"
28
49 struct UCharsetDetector;
54 typedef struct UCharsetDetector UCharsetDetector;
55
56 struct UCharsetMatch;
62 typedef struct UCharsetMatch UCharsetMatch;
63
72 U_STABLE UCharsetDetector * U_EXPORT2
73 ucsdet_open(UErrorCode *status);
74
84 U_STABLE void U_EXPORT2
85 ucsdet_close(UCharsetDetector *ucsd);
86
87 #if U_SHOW_CPLUSPLUS_API
88
89 U_NAMESPACE_BEGIN
90
100 U_DEFINE_LOCAL_OPEN_POINTER(LocalUCharsetDetectorPointer, UCharsetDetector, ucsdet_close);
101
102 U_NAMESPACE_END
103
104 #endif
105
121 U_STABLE void U_EXPORT2
122 ucsdet_setText(UCharsetDetector *ucsd, const char *textIn, int32_t len, UErrorCode *status);
123
124
143 U_STABLE void U_EXPORT2
144 ucsdet_setDeclaredEncoding(UCharsetDetector *ucsd, const char *encoding, int32_t length, UErrorCode *status);
145
146
172 U_STABLE const UCharsetMatch * U_EXPORT2
173 ucsdet_detect(UCharsetDetector *ucsd, UErrorCode *status);
174
175
206 U_STABLE const UCharsetMatch ** U_EXPORT2
207 ucsdet_detectAll(UCharsetDetector *ucsd, int32_t *matchesFound, UErrorCode *status);
208
209
210
226 U_STABLE const char * U_EXPORT2
227 ucsdet_getName(const UCharsetMatch *ucsm, UErrorCode *status);
228
252 U_STABLE int32_t U_EXPORT2
253 ucsdet_getConfidence(const UCharsetMatch *ucsm, UErrorCode *status);
254
284 U_STABLE const char * U_EXPORT2
285 ucsdet_getLanguage(const UCharsetMatch *ucsm, UErrorCode *status);
286
287
310 U_STABLE int32_t U_EXPORT2
311 ucsdet_getUChars(const UCharsetMatch *ucsm,
312 UChar *buf, int32_t cap, UErrorCode *status);
313
314
315
344 U_STABLE UEnumeration * U_EXPORT2
345 ucsdet_getAllDetectableCharsets(const UCharsetDetector *ucsd, UErrorCode *status);
346
358 U_STABLE UBool U_EXPORT2
359 ucsdet_isInputFilterEnabled(const UCharsetDetector *ucsd);
360
361
373 U_STABLE UBool U_EXPORT2
374 ucsdet_enableInputFilter(UCharsetDetector *ucsd, UBool filter);
375
376 #ifndef U_HIDE_INTERNAL_API
377
390 U_INTERNAL UEnumeration * U_EXPORT2
391 ucsdet_getDetectableCharsets(const UCharsetDetector *ucsd, UErrorCode *status);
392
406 U_INTERNAL void U_EXPORT2
407 ucsdet_setDetectableCharset(UCharsetDetector *ucsd, const char *encoding, UBool enabled, UErrorCode *status);
408 #endif /* U_HIDE_INTERNAL_API */
409
410 #endif
411 #endif /* __UCSDET_H */
412
413