ICU 76.1 76.1
Loading...
Searching...
No Matches
ucnv_err.h
Go to the documentation of this file.
1// © 2016 and later: Unicode, Inc. and others.
2// License & terms of use: http://www.unicode.org/copyright.html
3/*
4**********************************************************************
5* Copyright (C) 1999-2009, International Business Machines
6* Corporation and others. All Rights Reserved.
7**********************************************************************
8 *
9 *
10 * ucnv_err.h:
11 */
12
85#ifndef UCNV_ERR_H
86#define UCNV_ERR_H
87
88#include "unicode/utypes.h"
89
90#if !UCONFIG_NO_CONVERSION
91
93struct UConverter;
94
96typedef struct UConverter UConverter;
97
102#define UCNV_SUB_STOP_ON_ILLEGAL "i"
103
108#define UCNV_SKIP_STOP_ON_ILLEGAL "i"
109
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"
143
149#define UCNV_ESCAPE_CSS2 "S"
150
157typedef enum {
158 UCNV_UNASSIGNED = 0,
160 UCNV_ILLEGAL = 1,
168 UCNV_IRREGULAR = 2,
173 UCNV_RESET = 3,
176 UCNV_CLOSE = 4,
178 UCNV_CLONE = 5
188
189
204
205
220
221
237 const void *context,
238 UConverterFromUnicodeArgs *fromUArgs,
239 const UChar* codeUnits,
240 int32_t length,
241 UChar32 codePoint,
243 UErrorCode * err);
244
245
246
261 const void *context,
263 const char* codeUnits,
264 int32_t length,
266 UErrorCode * err);
267
288 const void *context,
289 UConverterFromUnicodeArgs *fromUArgs,
290 const UChar* codeUnits,
291 int32_t length,
292 UChar32 codePoint,
294 UErrorCode * err);
295
318 const void *context,
319 UConverterFromUnicodeArgs *fromUArgs,
320 const UChar* codeUnits,
321 int32_t length,
322 UChar32 codePoint,
324 UErrorCode * err);
325
374 const void *context,
375 UConverterFromUnicodeArgs *fromUArgs,
376 const UChar* codeUnits,
377 int32_t length,
378 UChar32 codePoint,
380 UErrorCode * err);
381
382
402 const void *context,
404 const char* codeUnits,
405 int32_t length,
407 UErrorCode * err);
408
428 const void *context,
430 const char* codeUnits,
431 int32_t length,
433 UErrorCode * err);
434
454 const void *context,
456 const char* codeUnits,
457 int32_t length,
459 UErrorCode * err);
460
461#endif
462
463#endif
464
465/*UCNV_ERR_H*/
The structure for the fromUnicode callback function parameter.
Definition ucnv_err.h:194
const char * targetLimit
Pointer to the limit (end + 1) of target buffer.
Definition ucnv_err.h:201
UBool flush
The internal state of converter will be reset and data flushed if set to true.
Definition ucnv_err.h:196
const UChar * source
Pointer to the source source buffer.
Definition ucnv_err.h:198
int32_t * offsets
Pointer to the buffer that receives the offsets.
Definition ucnv_err.h:202
const UChar * sourceLimit
Pointer to the limit (end + 1) of source buffer.
Definition ucnv_err.h:199
uint16_t size
The size of this struct.
Definition ucnv_err.h:195
char * target
Pointer to the target buffer.
Definition ucnv_err.h:200
UConverter * converter
Pointer to the converter that is opened and to which this struct is passed as an argument.
Definition ucnv_err.h:197
The structure for the toUnicode callback function parameter.
Definition ucnv_err.h:210
const UChar * targetLimit
Pointer to the limit (end + 1) of target buffer.
Definition ucnv_err.h:217
UBool flush
The internal state of converter will be reset and data flushed if set to true.
Definition ucnv_err.h:212
uint16_t size
The size of this struct.
Definition ucnv_err.h:211
UChar * target
Pointer to the target buffer.
Definition ucnv_err.h:216
UConverter * converter
Pointer to the converter that is opened and to which this struct is passed as an argument.
Definition ucnv_err.h:213
int32_t * offsets
Pointer to the buffer that receives the offsets.
Definition ucnv_err.h:218
const char * sourceLimit
Pointer to the limit (end + 1) of source buffer.
Definition ucnv_err.h:215
const char * source
Pointer to the source source buffer.
Definition ucnv_err.h:214
struct UConverter UConverter
Definition ucnv_err.h:96
U_CAPI 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...
UConverterCallbackReason
The process condition code to be used with the callbacks.
Definition ucnv_err.h:157
@ UCNV_IRREGULAR
The codepoint is not a regular sequence in the encoding.
Definition ucnv_err.h:168
@ UCNV_ILLEGAL
The code point is illegal.
Definition ucnv_err.h:160
@ UCNV_RESET
The callback is called with this reason when a 'reset' has occurred.
Definition ucnv_err.h:173
@ UCNV_CLOSE
Called when the converter is closed.
Definition ucnv_err.h:176
@ UCNV_UNASSIGNED
The code point is unassigned.
Definition ucnv_err.h:158
@ UCNV_CLONE
Called when ucnv_safeClone() is called on the converter.
Definition ucnv_err.h:178
U_CAPI 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,...
U_CAPI 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,...
U_CAPI 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,...
U_CAPI 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,...
U_CAPI 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,...
U_CAPI 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,...
U_CAPI 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...
int32_t UChar32
Define UChar32 as a type for single Unicode code points.
Definition umachine.h:427
int8_t UBool
The ICU boolean type, a signed-byte integer.
Definition umachine.h:247
#define U_CAPI
This is used to declare a function as a public ICU C API.
Definition umachine.h:110
char16_t UChar
The base type for UTF-16 code units and pointers.
Definition umachine.h:378
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
Definition utypes.h:430