ICU 4.2.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ucnvsel.h
Go to the documentation of this file.
1 /*
2 *******************************************************************************
3 *
4 * Copyright (C) 2008, International Business Machines
5 * Corporation, Google and others. All Rights Reserved.
6 *
7 *******************************************************************************
8 */
9 /*
10  * Author : eldawy@google.com (Mohamed Eldawy)
11  * ucnvsel.h
12  *
13  * Purpose: To generate a list of encodings capable of handling
14  * a given Unicode text
15  *
16  * Started 09-April-2008
17  */
18 
19 #ifndef __ICU_UCNV_SEL_H__
20 #define __ICU_UCNV_SEL_H__
21 
22 #include "unicode/uset.h"
23 #include "unicode/utypes.h"
24 #include "unicode/utf16.h"
25 #include "unicode/uenum.h"
26 #include "unicode/ucnv.h"
27 
43 struct UConverterSelector;
44 typedef struct UConverterSelector UConverterSelector;
69 U_CAPI UConverterSelector* U_EXPORT2
70 ucnvsel_open(const char* const* converterList, int32_t converterListSize,
71  const USet* excludedCodePoints,
72  const UConverterUnicodeSet whichSet, UErrorCode* status);
73 
87 U_CAPI void U_EXPORT2
88 ucnvsel_close(UConverterSelector *sel);
89 
105 U_CAPI UConverterSelector* U_EXPORT2
106 ucnvsel_openFromSerialized(const void* buffer, int32_t length, UErrorCode* status);
107 
123 ucnvsel_serialize(const UConverterSelector* sel,
124  void* buffer, int32_t bufferCapacity, UErrorCode* status);
125 
141 ucnvsel_selectForString(const UConverterSelector* sel,
142  const UChar *s, int32_t length, UErrorCode *status);
143 
159 ucnvsel_selectForUTF8(const UConverterSelector* sel,
160  const char *s, int32_t length, UErrorCode *status);
161 
162 #endif /* __ICU_UCNV_SEL_H__ */
U_CAPI UEnumeration * ucnvsel_selectForString(const UConverterSelector *sel, const UChar *s, int32_t length, UErrorCode *status)
Select converters that can map all characters in a UTF-16 string, ignoring the excluded code points...
#define U_CAPI
This is used to declare a function as a public ICU C API.
Definition: umachine.h:115
U_CAPI void ucnvsel_close(UConverterSelector *sel)
Closes a selector.
struct UEnumeration UEnumeration
structure representing an enumeration object instance
Definition: uenum.h:38
U_CAPI UEnumeration * ucnvsel_selectForUTF8(const UConverterSelector *sel, const char *s, int32_t length, UErrorCode *status)
Select converters that can map all characters in a UTF-8 string, ignoring the excluded code points...
C API: Unicode Set.
UConverterUnicodeSet
Selectors for Unicode sets that can be returned by ucnv_getUnicodeSet().
Definition: ucnv.h:873
#define U_EXPORT2
Definition: platform.h:338
U_CAPI UConverterSelector * ucnvsel_open(const char *const *converterList, int32_t converterListSize, const USet *excludedCodePoints, const UConverterUnicodeSet whichSet, UErrorCode *status)
Open a selector.
C API: 16-bit Unicode handling macros.
uint16_t UChar
Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned.
Definition: umachine.h:299
struct USet USet
Definition: ucnv.h:66
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:593
C API: String Enumeration.
Basic definitions for ICU, for both C and C++ APIs.
U_CAPI int32_t ucnvsel_serialize(const UConverterSelector *sel, void *buffer, int32_t bufferCapacity, UErrorCode *status)
Serialize a selector into a linear buffer.
U_CAPI UConverterSelector * ucnvsel_openFromSerialized(const void *buffer, int32_t length, UErrorCode *status)
Open a selector from its serialized form.
C API: Character conversion.
signed int int32_t
Define 64 bit limits.
Definition: pwin32.h:143