#include "unicode/utypes.h"
#if !UCONFIG_NO_CONVERSION
#include <memory>
#include "unicode/ustring.h"
#include "unicode/ucnv.h"
#include "unicode/ucnv_err.h"
#include "unicode/uset.h"
#include "unicode/utf.h"
#include "unicode/utf16.h"
#include "putilimp.h"
#include "cmemory.h"
#include "cstring.h"
#include "uassert.h"
#include "utracimp.h"
#include "ustr_imp.h"
#include "ucnv_imp.h"
#include "ucnv_cnv.h"
#include "ucnv_bld.h"
#define CHUNK_SIZE …
UAmbiguousConverter;
static const UAmbiguousConverter ambiguousConverters[]= …;
U_CAPI UConverter* U_EXPORT2
ucnv_open (const char *name,
UErrorCode * err)
{ … }
U_CAPI UConverter* U_EXPORT2
ucnv_openPackage (const char *packageName, const char *converterName, UErrorCode * err)
{ … }
U_CAPI UConverter* U_EXPORT2
ucnv_openU (const char16_t * name,
UErrorCode * err)
{ … }
static int32_t
ucnv_copyPlatformString(char *platformString, UConverterPlatform pltfrm)
{ … }
U_CAPI UConverter* U_EXPORT2
ucnv_openCCSID (int32_t codepage,
UConverterPlatform platform,
UErrorCode * err)
{ … }
U_CAPI UConverter* U_EXPORT2
ucnv_safeClone(const UConverter* cnv, void *stackBuffer, int32_t *pBufferSize, UErrorCode *status)
{ … }
U_CAPI UConverter* U_EXPORT2
ucnv_clone(const UConverter* cnv, UErrorCode *status)
{ … }
U_CAPI void U_EXPORT2
ucnv_close (UConverter * converter)
{ … }
U_CAPI const char* U_EXPORT2
ucnv_getAvailableName (int32_t n)
{ … }
U_CAPI int32_t U_EXPORT2
ucnv_countAvailable ()
{ … }
U_CAPI void U_EXPORT2
ucnv_getSubstChars (const UConverter * converter,
char *mySubChar,
int8_t * len,
UErrorCode * err)
{ … }
U_CAPI void U_EXPORT2
ucnv_setSubstChars (UConverter * converter,
const char *mySubChar,
int8_t len,
UErrorCode * err)
{ … }
U_CAPI void U_EXPORT2
ucnv_setSubstString(UConverter *cnv,
const char16_t *s,
int32_t length,
UErrorCode *err) { … }
static void _reset(UConverter *converter, UConverterResetChoice choice,
UBool callCallback) { … }
U_CAPI void U_EXPORT2
ucnv_reset(UConverter *converter)
{ … }
U_CAPI void U_EXPORT2
ucnv_resetToUnicode(UConverter *converter)
{ … }
U_CAPI void U_EXPORT2
ucnv_resetFromUnicode(UConverter *converter)
{ … }
U_CAPI int8_t U_EXPORT2
ucnv_getMaxCharSize (const UConverter * converter)
{ … }
U_CAPI int8_t U_EXPORT2
ucnv_getMinCharSize (const UConverter * converter)
{ … }
U_CAPI const char* U_EXPORT2
ucnv_getName (const UConverter * converter, UErrorCode * err)
{ … }
U_CAPI int32_t U_EXPORT2
ucnv_getCCSID(const UConverter * converter,
UErrorCode * err)
{ … }
U_CAPI UConverterPlatform U_EXPORT2
ucnv_getPlatform (const UConverter * converter,
UErrorCode * err)
{ … }
U_CAPI void U_EXPORT2
ucnv_getToUCallBack (const UConverter * converter,
UConverterToUCallback *action,
const void **context)
{ … }
U_CAPI void U_EXPORT2
ucnv_getFromUCallBack (const UConverter * converter,
UConverterFromUCallback *action,
const void **context)
{ … }
U_CAPI void U_EXPORT2
ucnv_setToUCallBack (UConverter * converter,
UConverterToUCallback newAction,
const void* newContext,
UConverterToUCallback *oldAction,
const void** oldContext,
UErrorCode * err)
{ … }
U_CAPI void U_EXPORT2
ucnv_setFromUCallBack (UConverter * converter,
UConverterFromUCallback newAction,
const void* newContext,
UConverterFromUCallback *oldAction,
const void** oldContext,
UErrorCode * err)
{ … }
static void
_updateOffsets(int32_t *offsets, int32_t length,
int32_t sourceIndex, int32_t errorInputLength) { … }
static void
_fromUnicodeWithCallback(UConverterFromUnicodeArgs *pArgs, UErrorCode *err) { … }
static UBool
ucnv_outputOverflowFromUnicode(UConverter *cnv,
char **target, const char *targetLimit,
int32_t **pOffsets,
UErrorCode *err) { … }
U_CAPI void U_EXPORT2
ucnv_fromUnicode(UConverter *cnv,
char **target, const char *targetLimit,
const char16_t **source, const char16_t *sourceLimit,
int32_t *offsets,
UBool flush,
UErrorCode *err) { … }
static void
_toUnicodeWithCallback(UConverterToUnicodeArgs *pArgs, UErrorCode *err) { … }
static UBool
ucnv_outputOverflowToUnicode(UConverter *cnv,
char16_t **target, const char16_t *targetLimit,
int32_t **pOffsets,
UErrorCode *err) { … }
U_CAPI void U_EXPORT2
ucnv_toUnicode(UConverter *cnv,
char16_t **target, const char16_t *targetLimit,
const char **source, const char *sourceLimit,
int32_t *offsets,
UBool flush,
UErrorCode *err) { … }
U_CAPI int32_t U_EXPORT2
ucnv_fromUChars(UConverter *cnv,
char *dest, int32_t destCapacity,
const char16_t *src, int32_t srcLength,
UErrorCode *pErrorCode) { … }
U_CAPI int32_t U_EXPORT2
ucnv_toUChars(UConverter *cnv,
char16_t *dest, int32_t destCapacity,
const char *src, int32_t srcLength,
UErrorCode *pErrorCode) { … }
U_CAPI UChar32 U_EXPORT2
ucnv_getNextUChar(UConverter *cnv,
const char **source, const char *sourceLimit,
UErrorCode *err) { … }
U_CAPI void U_EXPORT2
ucnv_convertEx(UConverter *targetCnv, UConverter *sourceCnv,
char **target, const char *targetLimit,
const char **source, const char *sourceLimit,
char16_t *pivotStart, char16_t **pivotSource,
char16_t **pivotTarget, const char16_t *pivotLimit,
UBool reset, UBool flush,
UErrorCode *pErrorCode) { … }
static int32_t
ucnv_internalConvert(UConverter *outConverter, UConverter *inConverter,
char *target, int32_t targetCapacity,
const char *source, int32_t sourceLength,
UErrorCode *pErrorCode) { … }
U_CAPI int32_t U_EXPORT2
ucnv_convert(const char *toConverterName, const char *fromConverterName,
char *target, int32_t targetCapacity,
const char *source, int32_t sourceLength,
UErrorCode *pErrorCode) { … }
static int32_t
ucnv_convertAlgorithmic(UBool convertToAlgorithmic,
UConverterType algorithmicType,
UConverter *cnv,
char *target, int32_t targetCapacity,
const char *source, int32_t sourceLength,
UErrorCode *pErrorCode) { … }
U_CAPI int32_t U_EXPORT2
ucnv_toAlgorithmic(UConverterType algorithmicType,
UConverter *cnv,
char *target, int32_t targetCapacity,
const char *source, int32_t sourceLength,
UErrorCode *pErrorCode) { … }
U_CAPI int32_t U_EXPORT2
ucnv_fromAlgorithmic(UConverter *cnv,
UConverterType algorithmicType,
char *target, int32_t targetCapacity,
const char *source, int32_t sourceLength,
UErrorCode *pErrorCode) UPRV_NO_SANITIZE_UNDEFINED { … }
U_CAPI UConverterType U_EXPORT2
ucnv_getType(const UConverter* converter)
{ … }
U_CAPI void U_EXPORT2
ucnv_getStarters(const UConverter* converter,
UBool starters[256],
UErrorCode* err)
{ … }
static const UAmbiguousConverter *ucnv_getAmbiguous(const UConverter *cnv)
{ … }
U_CAPI void U_EXPORT2
ucnv_fixFileSeparator(const UConverter *cnv,
char16_t* source,
int32_t sourceLength) { … }
U_CAPI UBool U_EXPORT2
ucnv_isAmbiguous(const UConverter *cnv) { … }
U_CAPI void U_EXPORT2
ucnv_setFallback(UConverter *cnv, UBool usesFallback)
{ … }
U_CAPI UBool U_EXPORT2
ucnv_usesFallback(const UConverter *cnv)
{ … }
U_CAPI void U_EXPORT2
ucnv_getInvalidChars (const UConverter * converter,
char *errBytes,
int8_t * len,
UErrorCode * err)
{ … }
U_CAPI void U_EXPORT2
ucnv_getInvalidUChars (const UConverter * converter,
char16_t *errChars,
int8_t * len,
UErrorCode * err)
{ … }
#define SIG_MAX_LEN …
U_CAPI const char* U_EXPORT2
ucnv_detectUnicodeSignature( const char* source,
int32_t sourceLength,
int32_t* signatureLength,
UErrorCode* pErrorCode) { … }
U_CAPI int32_t U_EXPORT2
ucnv_fromUCountPending(const UConverter* cnv, UErrorCode* status)
{ … }
U_CAPI int32_t U_EXPORT2
ucnv_toUCountPending(const UConverter* cnv, UErrorCode* status){ … }
U_CAPI UBool U_EXPORT2
ucnv_isFixedWidth(UConverter *cnv, UErrorCode *status){ … }
#endif