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
ucnv_err.h
Go to the documentation of this file.
1 /*
2 **********************************************************************
3 * Copyright (C) 1999-2009, International Business Machines
4 * Corporation and others. All Rights Reserved.
5 **********************************************************************
6 *
7 *
8 * ucnv_err.h:
9 */
10
83 #ifndef UCNV_ERR_H
84 #define UCNV_ERR_H
85
86 #include "unicode/utypes.h"
87
88 #if !UCONFIG_NO_CONVERSION
89
91 struct UConverter;
92
94 typedef struct UConverter UConverter;
95
100 #define UCNV_SUB_STOP_ON_ILLEGAL "i"
101
106 #define UCNV_SKIP_STOP_ON_ILLEGAL "i"
107
112 #define UCNV_ESCAPE_ICU NULL
113
117 #define UCNV_ESCAPE_JAVA "J"
118
123 #define UCNV_ESCAPE_C "C"
124
129 #define UCNV_ESCAPE_XML_DEC "D"
130
135 #define UCNV_ESCAPE_XML_HEX "X"
136
140 #define UCNV_ESCAPE_UNICODE "U"
141
147 #define UCNV_ESCAPE_CSS2 "S"
148
155 typedef enum {
156 UCNV_UNASSIGNED = 0,
158 UCNV_ILLEGAL = 1,
166 UCNV_IRREGULAR = 2,
171 UCNV_RESET = 3,
174 UCNV_CLOSE = 4,
176 UCNV_CLONE = 5
185 } UConverterCallbackReason;
186
187
192 typedef struct {
193 uint16_t size;
194 UBool flush;
195 UConverter *converter;
196 const UChar *source;
197 const UChar *sourceLimit;
198 char *target;
199 const char *targetLimit;
200 int32_t *offsets;
201 } UConverterFromUnicodeArgs;
202
203
208 typedef struct {
209 uint16_t size;
210 UBool flush;
211 UConverter *converter;
212 const char *source;
213 const char *sourceLimit;
214 UChar *target;
215 const UChar *targetLimit;
216 int32_t *offsets;
217 } UConverterToUnicodeArgs;
218
219
234 U_STABLE void U_EXPORT2 UCNV_FROM_U_CALLBACK_STOP (
235 const void *context,
236 UConverterFromUnicodeArgs *fromUArgs,
237 const UChar* codeUnits,
238 int32_t length,
239 UChar32 codePoint,
240 UConverterCallbackReason reason,
241 UErrorCode * err);
242
243
244
258 U_STABLE void U_EXPORT2 UCNV_TO_U_CALLBACK_STOP (
259 const void *context,
260 UConverterToUnicodeArgs *toUArgs,
261 const char* codeUnits,
262 int32_t length,
263 UConverterCallbackReason reason,
264 UErrorCode * err);
265
285 U_STABLE void U_EXPORT2 UCNV_FROM_U_CALLBACK_SKIP (
286 const void *context,
287 UConverterFromUnicodeArgs *fromUArgs,
288 const UChar* codeUnits,
289 int32_t length,
290 UChar32 codePoint,
291 UConverterCallbackReason reason,
292 UErrorCode * err);
293
315 U_STABLE void U_EXPORT2 UCNV_FROM_U_CALLBACK_SUBSTITUTE (
316 const void *context,
317 UConverterFromUnicodeArgs *fromUArgs,
318 const UChar* codeUnits,
319 int32_t length,
320 UChar32 codePoint,
321 UConverterCallbackReason reason,
322 UErrorCode * err);
323
371 U_STABLE void U_EXPORT2 UCNV_FROM_U_CALLBACK_ESCAPE (
372 const void *context,
373 UConverterFromUnicodeArgs *fromUArgs,
374 const UChar* codeUnits,
375 int32_t length,
376 UChar32 codePoint,
377 UConverterCallbackReason reason,
378 UErrorCode * err);
379
380
399 U_STABLE void U_EXPORT2 UCNV_TO_U_CALLBACK_SKIP (
400 const void *context,
401 UConverterToUnicodeArgs *toUArgs,
402 const char* codeUnits,
403 int32_t length,
404 UConverterCallbackReason reason,
405 UErrorCode * err);
406
425 U_STABLE void U_EXPORT2 UCNV_TO_U_CALLBACK_SUBSTITUTE (
426 const void *context,
427 UConverterToUnicodeArgs *toUArgs,
428 const char* codeUnits,
429 int32_t length,
430 UConverterCallbackReason reason,
431 UErrorCode * err);
432
451 U_STABLE void U_EXPORT2 UCNV_TO_U_CALLBACK_ESCAPE (
452 const void *context,
453 UConverterToUnicodeArgs *toUArgs,
454 const char* codeUnits,
455 int32_t length,
456 UConverterCallbackReason reason,
457 UErrorCode * err);
458
459 #endif
460
461 #endif
462
463 /*UCNV_ERR_H*/