Movatterモバイル変換


[0]ホーム

URL:


ICU 77.1  77.1
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 
93 structUConverter;
94 
96 typedefstructUConverterUConverter;
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 
157 typedefenum {
158 UCNV_UNASSIGNED = 0,
160 UCNV_ILLEGAL = 1,
168 UCNV_IRREGULAR = 2,
173 UCNV_RESET = 3,
176 UCNV_CLOSE = 4,
178 UCNV_CLONE = 5
187 }UConverterCallbackReason;
188 
189 
194 typedefstruct{
195  uint16_tsize;
196 UBoolflush;
197 UConverter *converter;
198 constUChar *source;
199 constUChar *sourceLimit;
200 char *target;
201 constchar *targetLimit;
202  int32_t *offsets;
203 }UConverterFromUnicodeArgs;
204 
205 
210 typedefstruct{
211  uint16_tsize;
212 UBoolflush;
213 UConverter *converter;
214 constchar *source;
215 constchar *sourceLimit;
216 UChar *target;
217 constUChar *targetLimit;
218  int32_t *offsets;
219 }UConverterToUnicodeArgs;
220 
221 
236 U_CAPIvoid U_EXPORT2UCNV_FROM_U_CALLBACK_STOP (
237 constvoid *context,
238 UConverterFromUnicodeArgs *fromUArgs,
239 constUChar* codeUnits,
240  int32_t length,
241 UChar32 codePoint,
242 UConverterCallbackReason reason,
243 UErrorCode * err);
244 
245 
246 
260 U_CAPIvoid U_EXPORT2UCNV_TO_U_CALLBACK_STOP (
261 constvoid *context,
262 UConverterToUnicodeArgs *toUArgs,
263 constchar* codeUnits,
264  int32_t length,
265 UConverterCallbackReason reason,
266 UErrorCode * err);
267 
287 U_CAPIvoid U_EXPORT2UCNV_FROM_U_CALLBACK_SKIP (
288 constvoid *context,
289 UConverterFromUnicodeArgs *fromUArgs,
290 constUChar* codeUnits,
291  int32_t length,
292 UChar32 codePoint,
293 UConverterCallbackReason reason,
294 UErrorCode * err);
295 
317 U_CAPIvoid U_EXPORT2UCNV_FROM_U_CALLBACK_SUBSTITUTE (
318 constvoid *context,
319 UConverterFromUnicodeArgs *fromUArgs,
320 constUChar* codeUnits,
321  int32_t length,
322 UChar32 codePoint,
323 UConverterCallbackReason reason,
324 UErrorCode * err);
325 
373 U_CAPIvoid U_EXPORT2UCNV_FROM_U_CALLBACK_ESCAPE (
374 constvoid *context,
375 UConverterFromUnicodeArgs *fromUArgs,
376 constUChar* codeUnits,
377  int32_t length,
378 UChar32 codePoint,
379 UConverterCallbackReason reason,
380 UErrorCode * err);
381 
382 
401 U_CAPIvoid U_EXPORT2UCNV_TO_U_CALLBACK_SKIP (
402 constvoid *context,
403 UConverterToUnicodeArgs *toUArgs,
404 constchar* codeUnits,
405  int32_t length,
406 UConverterCallbackReason reason,
407 UErrorCode * err);
408 
427 U_CAPIvoid U_EXPORT2UCNV_TO_U_CALLBACK_SUBSTITUTE (
428 constvoid *context,
429 UConverterToUnicodeArgs *toUArgs,
430 constchar* codeUnits,
431  int32_t length,
432 UConverterCallbackReason reason,
433 UErrorCode * err);
434 
453 U_CAPIvoid U_EXPORT2UCNV_TO_U_CALLBACK_ESCAPE (
454 constvoid *context,
455 UConverterToUnicodeArgs *toUArgs,
456 constchar* codeUnits,
457  int32_t length,
458 UConverterCallbackReason reason,
459 UErrorCode * err);
460 
461 #endif
462 
463 #endif
464 
465 /*UCNV_ERR_H*/
UConverterFromUnicodeArgs
The structure for the fromUnicode callback function parameter.
Definition:ucnv_err.h:194
UConverterFromUnicodeArgs::targetLimit
const char * targetLimit
Pointer to the limit (end + 1) of target buffer.
Definition:ucnv_err.h:201
UConverterFromUnicodeArgs::flush
UBool flush
The internal state of converter will be reset and data flushed if set to true.
Definition:ucnv_err.h:196
UConverterFromUnicodeArgs::source
const UChar * source
Pointer to the source source buffer.
Definition:ucnv_err.h:198
UConverterFromUnicodeArgs::offsets
int32_t * offsets
Pointer to the buffer that receives the offsets.
Definition:ucnv_err.h:202
UConverterFromUnicodeArgs::sourceLimit
const UChar * sourceLimit
Pointer to the limit (end + 1) of source buffer.
Definition:ucnv_err.h:199
UConverterFromUnicodeArgs::size
uint16_t size
The size of this struct.
Definition:ucnv_err.h:195
UConverterFromUnicodeArgs::target
char * target
Pointer to the target buffer.
Definition:ucnv_err.h:200
UConverterFromUnicodeArgs::converter
UConverter * converter
Pointer to the converter that is opened and to which this struct is passed as an argument.
Definition:ucnv_err.h:197
UConverterToUnicodeArgs
The structure for the toUnicode callback function parameter.
Definition:ucnv_err.h:210
UConverterToUnicodeArgs::targetLimit
const UChar * targetLimit
Pointer to the limit (end + 1) of target buffer.
Definition:ucnv_err.h:217
UConverterToUnicodeArgs::flush
UBool flush
The internal state of converter will be reset and data flushed if set to true.
Definition:ucnv_err.h:212
UConverterToUnicodeArgs::size
uint16_t size
The size of this struct.
Definition:ucnv_err.h:211
UConverterToUnicodeArgs::target
UChar * target
Pointer to the target buffer.
Definition:ucnv_err.h:216
UConverterToUnicodeArgs::converter
UConverter * converter
Pointer to the converter that is opened and to which this struct is passed as an argument.
Definition:ucnv_err.h:213
UConverterToUnicodeArgs::offsets
int32_t * offsets
Pointer to the buffer that receives the offsets.
Definition:ucnv_err.h:218
UConverterToUnicodeArgs::sourceLimit
const char * sourceLimit
Pointer to the limit (end + 1) of source buffer.
Definition:ucnv_err.h:215
UConverterToUnicodeArgs::source
const char * source
Pointer to the source source buffer.
Definition:ucnv_err.h:214
UConverter
struct UConverter UConverter
Definition:ucnv_err.h:96
UCNV_FROM_U_CALLBACK_ESCAPE
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
UConverterCallbackReason
The process condition code to be used with the callbacks.
Definition:ucnv_err.h:157
UCNV_IRREGULAR
@ UCNV_IRREGULAR
The codepoint is not a regular sequence in the encoding.
Definition:ucnv_err.h:168
UCNV_ILLEGAL
@ UCNV_ILLEGAL
The code point is illegal.
Definition:ucnv_err.h:160
UCNV_RESET
@ UCNV_RESET
The callback is called with this reason when a 'reset' has occurred.
Definition:ucnv_err.h:173
UCNV_CLOSE
@ UCNV_CLOSE
Called when the converter is closed.
Definition:ucnv_err.h:176
UCNV_UNASSIGNED
@ UCNV_UNASSIGNED
The code point is unassigned.
Definition:ucnv_err.h:158
UCNV_CLONE
@ UCNV_CLONE
Called when ucnv_safeClone() is called on the converter.
Definition:ucnv_err.h:178
UCNV_TO_U_CALLBACK_SUBSTITUTE
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,...
UCNV_FROM_U_CALLBACK_SKIP
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,...
UCNV_FROM_U_CALLBACK_STOP
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,...
UCNV_FROM_U_CALLBACK_SUBSTITUTE
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,...
UCNV_TO_U_CALLBACK_STOP
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,...
UCNV_TO_U_CALLBACK_SKIP
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,...
UCNV_TO_U_CALLBACK_ESCAPE
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...
UChar32
int32_t UChar32
Define UChar32 as a type for single Unicode code points.
Definition:umachine.h:427
UBool
int8_t UBool
The ICU boolean type, a signed-byte integer.
Definition:umachine.h:247
U_CAPI
#define U_CAPI
This is used to declare a function as a public ICU C API.
Definition:umachine.h:110
UChar
char16_t UChar
The base type for UTF-16 code units and pointers.
Definition:umachine.h:378
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
Definition:utypes.h:430

Generated by doxygen 1.9.1
[8]ページ先頭

©2009-2025 Movatter.jp