Go to the documentation of this file.
90 #if !UCONFIG_NO_CONVERSION
102 #define UCNV_SUB_STOP_ON_ILLEGAL "i"
108 #define UCNV_SKIP_STOP_ON_ILLEGAL "i"
114 #define UCNV_ESCAPE_ICU NULL
119 #define UCNV_ESCAPE_JAVA "J"
125 #define UCNV_ESCAPE_C "C"
131 #define UCNV_ESCAPE_XML_DEC "D"
137 #define UCNV_ESCAPE_XML_HEX "X"
142 #define UCNV_ESCAPE_UNICODE "U"
149 #define UCNV_ESCAPE_CSS2 "S"
239 const UChar* codeUnits,
263 const char* codeUnits,
290 const UChar* codeUnits,
320 const UChar* codeUnits,
376 const UChar* codeUnits,
404 const char* codeUnits,
430 const char* codeUnits,
456 const char* codeUnits,
void UCNV_FROM_U_CALLBACK_SUBSTITUTE(const void *context, UConverterFromUnicodeArgs *fromUArgs, const UChar *codeUnits, int32_t length, UChar32 codePoint, UConverterCallbackReason reason, UErrorCode *err)
DO NOT CALL THIS FUNCTION DIRECTLY! This From Unicode callback will Substitute the ILLEGAL SEQUENCE,...
The structure for the toUnicode callback function parameter.
@ UCNV_RESET
The callback is called with this reason when a 'reset' has occurred.
uint16_t size
The size of this struct.
Basic definitions for ICU, for both C and C++ APIs.
UConverterCallbackReason
The process condition code to be used with the callbacks.
@ UCNV_IRREGULAR
The codepoint is not a regular sequence in the encoding.
int8_t UBool
The ICU boolean type.
void UCNV_FROM_U_CALLBACK_ESCAPE(const void *context, UConverterFromUnicodeArgs *fromUArgs, const UChar *codeUnits, int32_t length, UChar32 codePoint, UConverterCallbackReason reason, UErrorCode *err)
DO NOT CALL THIS FUNCTION DIRECTLY! This From Unicode callback will Substitute the ILLEGAL SEQUENCE w...
UConverter * converter
Pointer to the converter that is opened and to which this struct is passed as an argument.
UBool flush
The internal state of converter will be reset and data flushed if set to TRUE.
UBool flush
The internal state of converter will be reset and data flushed if set to TRUE.
int32_t * offsets
Pointer to the buffer that receives the offsets.
void UCNV_FROM_U_CALLBACK_STOP(const void *context, UConverterFromUnicodeArgs *fromUArgs, const UChar *codeUnits, int32_t length, UChar32 codePoint, UConverterCallbackReason reason, UErrorCode *err)
DO NOT CALL THIS FUNCTION DIRECTLY! This From Unicode callback STOPS at the ILLEGAL_SEQUENCE,...
int32_t UChar32
Define UChar32 as a type for single Unicode code points.
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers,...
const UChar * sourceLimit
Pointer to the limit (end + 1) of source buffer.
The structure for the fromUnicode callback function parameter.
const char * source
Pointer to the source source buffer.
char * target
Pointer to the target buffer.
void UCNV_TO_U_CALLBACK_ESCAPE(const void *context, UConverterToUnicodeArgs *toUArgs, const char *codeUnits, int32_t length, UConverterCallbackReason reason, UErrorCode *err)
DO NOT CALL THIS FUNCTION DIRECTLY! This To Unicode callback will Substitute the ILLEGAL SEQUENCE wit...
const char * sourceLimit
Pointer to the limit (end + 1) of source buffer.
int32_t * offsets
Pointer to the buffer that receives the offsets.
@ UCNV_ILLEGAL
The code point is illegal.
void UCNV_FROM_U_CALLBACK_SKIP(const void *context, UConverterFromUnicodeArgs *fromUArgs, const UChar *codeUnits, int32_t length, UChar32 codePoint, UConverterCallbackReason reason, UErrorCode *err)
DO NOT CALL THIS FUNCTION DIRECTLY! This From Unicode callback skips any ILLEGAL_SEQUENCE,...
@ UCNV_UNASSIGNED
The code point is unassigned.
@ UCNV_CLONE
Called when ucnv_safeClone() is called on the converter.
UChar * target
Pointer to the target buffer.
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
struct UConverter UConverter
void UCNV_TO_U_CALLBACK_SUBSTITUTE(const void *context, UConverterToUnicodeArgs *toUArgs, const char *codeUnits, int32_t length, UConverterCallbackReason reason, UErrorCode *err)
DO NOT CALL THIS FUNCTION DIRECTLY! This To Unicode callback will Substitute the ILLEGAL SEQUENCE,...
@ UCNV_CLOSE
Called when the converter is closed.
void UCNV_TO_U_CALLBACK_SKIP(const void *context, UConverterToUnicodeArgs *toUArgs, const char *codeUnits, int32_t length, UConverterCallbackReason reason, UErrorCode *err)
DO NOT CALL THIS FUNCTION DIRECTLY! This To Unicode callback skips any ILLEGAL_SEQUENCE,...
const char * targetLimit
Pointer to the limit (end + 1) of target buffer.
const UChar * source
Pointer to the source source buffer.
uint16_t size
The size of this struct.
void UCNV_TO_U_CALLBACK_STOP(const void *context, UConverterToUnicodeArgs *toUArgs, const char *codeUnits, int32_t length, UConverterCallbackReason reason, UErrorCode *err)
DO NOT CALL THIS FUNCTION DIRECTLY! This To Unicode callback STOPS at the ILLEGAL_SEQUENCE,...
UConverter * converter
Pointer to the converter that is opened and to which this struct is passed as an argument.
const UChar * targetLimit
Pointer to the limit (end + 1) of target buffer.