Typedefs | |||
![]() | ![]() | typedef void (* | UConverterFromUCallback )(UConverter *, char **, const char *, const UChar **, const UChar *, int32_t* offsets, bool_t, UErrorCode *) |
Functions | |||
![]() | ![]() | U_CDECL_END U_CAPI UConverter* U_EXPORT2 | ucnv_open (const char *converterName, UErrorCode * err) |
![]() | ![]() | Creates a UConverter object with the names specified as a C string. More... | |
![]() | ![]() | U_CAPI UConverter* U_EXPORT2 | ucnv_openU (const UChar * name, UErrorCode * err) |
![]() | ![]() | Creates a Unicode converter with the names specified as unicode string. More... | |
![]() | ![]() | U_CAPI UConverter* U_EXPORT2 | ucnv_openCCSID (int32_t codepage, UConverterPlatform platform, UErrorCode * err) |
![]() | ![]() | Creates a UConverter object using a CCSID number. More... | |
![]() | ![]() | U_CAPI void U_EXPORT2 | ucnv_close (UConverter * converter) |
![]() | ![]() | Deletes the unicode converter. More... | |
![]() | ![]() | U_CAPI void U_EXPORT2 | ucnv_getSubstChars (const UConverter * converter, char *subChars, int8_t * len, UErrorCode * err) |
![]() | ![]() | Fills in the output parameter, subChars, with the substitution characters as multiple bytes. More... | |
![]() | ![]() | U_CAPI void U_EXPORT2 | ucnv_setSubstChars (UConverter * converter, const char *subChars, int8_t len, UErrorCode * err) |
![]() | ![]() | Sets the substitution chars when converting from unicode to a codepage. More... | |
![]() | ![]() | U_CAPI void U_EXPORT2 | ucnv_getInvalidChars (const UConverter * converter, char *errBytes, int8_t * len, UErrorCode * err) |
![]() | ![]() | Fills in the output parameter, errBytes, with the error characters from the last failing conversion. More... | |
![]() | ![]() | U_CAPI void U_EXPORT2 | ucnv_getInvalidUChars (const UConverter * converter, char *errUChars, int8_t * len, UErrorCode * err) |
![]() | ![]() | Fills in the output parameter, errChars, with the error characters from the last failing conversion. More... | |
![]() | ![]() | U_CAPI void U_EXPORT2 | ucnv_reset (UConverter * converter) |
![]() | ![]() | Resets the state of stateful conversion to the default state. More... | |
![]() | ![]() | U_CAPI int8_t U_EXPORT2 | ucnv_getMaxCharSize (const UConverter * converter) |
![]() | ![]() | Returns the maximum length of bytes used by a character. More... | |
![]() | ![]() | U_CAPI int8_t U_EXPORT2 | ucnv_getMinCharSize (const UConverter * converter) |
![]() | ![]() | Returns the minimum byte length for characters in this codepage. More... | |
![]() | ![]() | U_CAPI int32_t U_EXPORT2 | ucnv_getDisplayName (const UConverter * converter, const char *displayLocale, UChar * displayName, int32_t displayNameCapacity, UErrorCode * err) |
![]() | ![]() | Returns the display name of the converter passed in based on the Locale passed in, in the case the locale contains no display name, the internal ASCII name will be filled in. More... | |
![]() | ![]() | U_CAPI const char* U_EXPORT2 | ucnv_getName (const UConverter * converter, UErrorCode * err) |
![]() | ![]() | Gets the name of the converter (zero-terminated). More... | |
![]() | ![]() | U_CAPI int32_t U_EXPORT2 | ucnv_getCCSID (const UConverter * converter, UErrorCode * err) |
![]() | ![]() | Gets a codepage number associated with the converter. More... | |
![]() | ![]() | U_CAPI UConverterPlatform U_EXPORT2 | ucnv_getPlatform (const UConverter * converter, UErrorCode * err) |
![]() | ![]() | Gets a codepage platform associated with the converter. More... | |
![]() | ![]() | U_CAPI UConverterType U_EXPORT2 | ucnv_getType (const UConverter * converter) |
![]() | ![]() | Gets the type of conversion associated with the converter e.g. More... | |
![]() | ![]() | U_CAPI void U_EXPORT2 | ucnv_getStarters (const UConverter* converter, bool_t starters[256], UErrorCode* err) |
![]() | ![]() | Gets the "starter" bytes for the converters of type MBCS will fill in an U_ILLEGAL_ARGUMENT_ERROR if converter passed in is not MBCS. More... | |
![]() | ![]() | U_CAPI UConverterToUCallback U_EXPORT2 | ucnv_getToUCallBack (const UConverter * converter) |
![]() | ![]() | Gets the current calback function used by the converter when illegal or invalid sequence found. More... | |
![]() | ![]() | U_CAPI UConverterFromUCallback U_EXPORT2 | ucnv_getFromUCallBack (const UConverter * converter) |
![]() | ![]() | Gets the current callback function used by the converter when illegal or invalid sequence found. More... | |
![]() | ![]() | U_CAPI UConverterToUCallback U_EXPORT2 | ucnv_setToUCallBack (UConverter * converter, UConverterToUCallback action, UErrorCode * err) |
![]() | ![]() | Gets the current callback function used by the converter when illegal or invalid sequence found. More... | |
![]() | ![]() | U_CAPI UConverterFromUCallback U_EXPORT2 | ucnv_setFromUCallBack (UConverter * converter, UConverterFromUCallback action, UErrorCode * err) |
![]() | ![]() | Gets the current callback function used by the converter when illegal or invalid sequence found. More... | |
![]() | ![]() | U_CAPI void U_EXPORT2 | ucnv_fromUnicode (UConverter * converter, char **target, const char *targetLimit, const UChar ** source, const UChar * sourceLimit, int32_t* offsets, bool_t flush, UErrorCode * err) |
![]() | ![]() | Transcodes an array of unicode characters to an array of codepage characters. More... | |
![]() | ![]() | U_CAPI void U_EXPORT2 | ucnv_toUnicode (UConverter * converter, UChar ** target, const UChar * targetLimit, const char **source, const char *sourceLimit, int32_t* offsets, bool_t flush, UErrorCode * err) |
![]() | ![]() | Converts an array of codepage characters into an array of unicode characters. More... | |
![]() | ![]() | U_CAPI int32_t U_EXPORT2 | ucnv_fromUChars (const UConverter * converter, char *target, int32_t targetCapacity, const UChar * source, UErrorCode * err) |
![]() | ![]() | Transcodes the source Unicode string to the target string in a codepage encoding with the specified Unicode converter. More... | |
![]() | ![]() | U_CAPI int32_t U_EXPORT2 | ucnv_toUChars (const UConverter * converter, UChar * target, int32_t targetCapacity, const char *source, int32_t sourceSize, UErrorCode * err) |
![]() | ![]() | Transcode the source string in codepage encoding to the target string in Unicode encoding. More... | |
![]() | ![]() | U_CAPI UChar U_EXPORT2 | ucnv_getNextUChar (UConverter * converter, const char **source, const char *sourceLimit, UErrorCode * err) |
![]() | ![]() | 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 * err) |
![]() | ![]() | U_CAPI int32_t U_EXPORT2 | ucnv_flushCache (void) |
![]() | ![]() | SYSTEM API Iterates through every cached converter and frees all the unused ones. More... | |
![]() | ![]() | U_CAPI const char* U_EXPORT2 | ucnv_getAvailableName (int32_t index) |
![]() | ![]() | provides a string containing the internal name (based on the alias file) of the converter. More... | |
![]() | ![]() | U_CAPI int32_t U_EXPORT2 | ucnv_countAvailable (void) |
![]() | ![]() | returns the number of available converters. More... | |
![]() | ![]() | U_CAPI uint16_t | ucnv_countAliases (const char *alias, UErrorCode *pErrorCode) |
![]() | ![]() | Gives the number of aliases for given converter or alias name. More... | |
![]() | ![]() | U_CAPI const char* | ucnv_getAlias (const char *alias, uint16_t index, UErrorCode *pErrorCode) |
![]() | ![]() | Gives the name of the alias at given index of alias list. More... | |
![]() | ![]() | U_CAPI void | ucnv_getAliases (const char *alias, const char **aliases, UErrorCode *pErrorCode) |
![]() | ![]() | Fill-up the list of alias names for the given alias. More... | |
![]() | ![]() | U_CAPI const char* U_EXPORT2 | ucnv_getDefaultName (void) |
![]() | ![]() | returns the current default converter name. More... | |
![]() | ![]() | U_CAPI void U_EXPORT2 | ucnv_setDefaultName (const char *name) |
![]() | ![]() | sets the current default converter name. More... | |
![]() | ![]() | U_CAPI void U_EXPORT2 | ucnv_fixFileSeparator (const UConverter *cnv, UChar* source, int32_t sourceLen) |
![]() | ![]() | Fixes the backslash character mismapping. More... | |
![]() | ![]() | U_CAPI bool_t U_EXPORT2 | ucnv_isAmbiguous (const UConverter *cnv) |
![]() | ![]() | Determines if the converter contains ambiguous mappings of the same character or not. More... | |
Variables | |||
![]() | ![]() | U_CDECL_BEGIN typedef void (* | UConverterToUCallback )(UConverter *, UChar **, const UChar *, const char **, const char *, int32_t* offsets, bool_t, UErrorCode *) |
Character Conversion C API documentation is still under construction. Please check for updates soon.
typedef void (* UConverterFromUCallback)(UConverter *, char **, const char *, const UChar **, const UChar *, int32_t* offsets, bool_t, UErrorCode *) |
U_CDECL_END U_CAPI UConverter *U_EXPORT2 ucnv_open (const char * converterName, UErrorCode * err) |
Creates a UConverter object with the names specified as a C string.
The actual name will be resolved with the alias file. if NULL
is passed for the converter name, it will create one with the getDefaultName return value.
converterName | : name of the uconv table |
err |
outgoing error status U_MEMORY_ALLOCATION_ERROR, TABLE_NOT_FOUND |
NULL
if an error occured U_CAPI UConverter *U_EXPORT2 ucnv_openU (const UChar * name, UErrorCode * err) |
Creates a Unicode converter with the names specified as unicode string.
The name should be limited to the ASCII-7 alphanumerics range. The actual name will be resolved with the alias file. if NULL
is passed for the converter name, it will create one with the getDefaultName return value.
converterName | : name of the uconv table in a zero terminated Unicode string |
err |
outgoing error status U_MEMORY_ALLOCATION_ERROR, TABLE_NOT_FOUND |
NULL
if an error occured U_CAPI UConverter *U_EXPORT2 ucnv_openCCSID (int32_t codepage, UConverterPlatform platform, UErrorCode * err) |
Creates a UConverter object using a CCSID number.
codepage | : codepage # of the uconv table |
platform |
: codepage's platform (now only IBM supported) |
err |
error status U_MEMORY_ALLOCATION_ERROR, TABLE_NOT_FOUND |
NULL
if and error occured U_CAPI void U_EXPORT2 ucnv_close (UConverter * converter) |
Deletes the unicode converter.
converter | the converter object to be deleted |
U_CAPI void U_EXPORT2 ucnv_getSubstChars (const UConverter * converter, char * subChars, int8_t * len, UErrorCode * err) |
Fills in the output parameter, subChars, with the substitution characters as multiple bytes.
converter: | the Unicode converter |
subChars: | the subsitution characters |
len: | on input the capacity of subChars, on output the number of bytes copied to it |
err: |
the outgoing error status code. If the substitution character array is too small, an U_INDEX_OUTOFBOUNDS_ERROR will be returned. |
U_CAPI void U_EXPORT2 ucnv_setSubstChars (UConverter * converter, const char * subChars, int8_t len, UErrorCode * err) |
Sets the substitution chars when converting from unicode to a codepage.
The substitution is specified as a string of 1-4 bytes, and may contain NULL
byte. The fill-in parameter err will get the error status on return.
converter | the Unicode converter |
subChars | the substitution character byte sequence we want set |
len | the number of bytes in subChars |
err |
the error status code. U_INDEX_OUTOFBOUNDS_ERROR if len is bigger than the maximum number of bytes allowed in subchars |
U_CAPI void U_EXPORT2 ucnv_getInvalidChars (const UConverter * converter, char * errBytes, int8_t * len, UErrorCode * err) |
Fills in the output parameter, errBytes, with the error characters from the last failing conversion.
converter: | the Unicode converter |
errBytes: | the bytes in error |
len: | on input the capacity of errBytes, on output the number of bytes copied to it |
err: |
the outgoing error status code. If the substitution character array is too small, an U_INDEX_OUTOFBOUNDS_ERROR will be returned. |
U_CAPI void U_EXPORT2 ucnv_getInvalidUChars (const UConverter * converter, char * errUChars, int8_t * len, UErrorCode * err) |
Fills in the output parameter, errChars, with the error characters from the last failing conversion.
converter: | the Unicode converter |
errUChars: | the bytes in error |
len: | on input the capacity of errUChars, on output the number of UChars copied to it |
err: |
the outgoing error status code. If the substitution character array is too small, an U_INDEX_OUTOFBOUNDS_ERROR will be returned. |
U_CAPI void U_EXPORT2 ucnv_reset (UConverter * converter) |
Resets the state of stateful conversion to the default state.
This is used in the case of error to restart a conversion from a known default state. it will also empty the internal output buffers.
converter | the Unicode converter |
U_CAPI int8_t U_EXPORT2 ucnv_getMaxCharSize (const UConverter * converter) |
Returns the maximum length of bytes used by a character.
This varies between 1 and 4
converter | the Unicode converter |
U_CAPI int8_t U_EXPORT2 ucnv_getMinCharSize (const UConverter * converter) |
Returns the minimum byte length for characters in this codepage.
This is either 1 or 2 for all supported codepages.
converter | the Unicode converter |
U_CAPI int32_t U_EXPORT2 ucnv_getDisplayName (const UConverter * converter, const char * displayLocale, UChar * displayName, int32_t displayNameCapacity, UErrorCode * err) |
Returns the display name of the converter passed in based on the Locale passed in, in the case the locale contains no display name, the internal ASCII name will be filled in.
converter | the Unicode converter. |
displayLocale | is the specific Locale we want to localised for |
displayName | user provided buffer to be filled in |
displayNameCapacty | size of displayName Buffer |
err: | outgoing error code. |
U_CAPI const char *U_EXPORT2 ucnv_getName (const UConverter * converter, UErrorCode * err) |
Gets the name of the converter (zero-terminated).
the name will be the internal name of the converter, the lifetime of the returned string will be that of the converter passed to this function.
converter | the Unicode converter |
err | UErrorCode status |
U_CAPI int32_t U_EXPORT2 ucnv_getCCSID (const UConverter * converter, UErrorCode * err) |
Gets a codepage number associated with the converter.
This is not guaranteed to be the one used to create the converter. Some converters do not represent IBM registered codepages and return zero for the codepage number. The error code fill-in parameter indicates if the codepage number is available.
converter | the Unicode converter |
err |
the error status code. the converter is NULL or if converter's data table is NULL . |
U_CAPI UConverterPlatform U_EXPORT2 ucnv_getPlatform (const UConverter * converter, UErrorCode * err) |
Gets a codepage platform associated with the converter.
Currently, only IBM
is supported The error code fill-in parameter indicates if the codepage number is available.
converter | the Unicode converter |
err |
the error status code. the converter is NULL or if converter's data table is NULL . |
U_CAPI UConverterType U_EXPORT2 ucnv_getType (const UConverter * converter) |
Gets the type of conversion associated with the converter e.g.
SBCS, MBCS, DBCS, UTF8, UTF16_BE, UTF16_LE, ISO_2022, EBCDIC_STATEFUL, LATIN_1
converter: | a valid, opened converter |
U_CAPI void U_EXPORT2 ucnv_getStarters (const UConverter * converter, bool_t starters[256], UErrorCode * err) |
Gets the "starter" bytes for the converters of type MBCS will fill in an U_ILLEGAL_ARGUMENT_ERROR
if converter passed in is not MBCS.
fills in an array of boolean, with the value of the byte as offset to the array. At return, if TRUE is found in at offset 0x20, it means that the byte 0x20 is a starter byte in this converter.
converter: | a valid, opened converter of type MBCS |
starters: | an array of size 256 to be filled in |
err: | an array of size 256 to be filled in |
U_CAPI UConverterToUCallback U_EXPORT2 ucnv_getToUCallBack (const UConverter * converter) |
Gets the current calback function used by the converter when illegal or invalid sequence found.
converter | the unicode converter |
U_CAPI UConverterFromUCallback U_EXPORT2 ucnv_getFromUCallBack (const UConverter * converter) |
Gets the current callback function used by the converter when illegal or invalid sequence found.
converter | the unicode converter |
U_CAPI UConverterToUCallback U_EXPORT2 ucnv_setToUCallBack (UConverter * converter, UConverterToUCallback action, UErrorCode * err) |
Gets the current callback function used by the converter when illegal or invalid sequence found.
converter | the unicode converter |
action | the callback function we want to set. |
err | The error code status |
U_CAPI UConverterFromUCallback U_EXPORT2 ucnv_setFromUCallBack (UConverter * converter, UConverterFromUCallback action, UErrorCode * err) |
Gets the current callback function used by the converter when illegal or invalid sequence found.
converter | the unicode converter |
action | the callback function we want to set. |
err | The error code status |
U_CAPI void U_EXPORT2 ucnv_fromUnicode (UConverter * converter, char ** target, const char * targetLimit, const UChar ** source, const UChar * sourceLimit, int32_t * offsets, bool_t flush, UErrorCode * err) |
Transcodes an array of unicode characters to an array of codepage characters.
The source pointer is an I/O parameter, it starts out pointing where the function is to begin transcoding, and ends up pointing after the first sequence of the bytes that it encounters that are semantically invalid. if ucnv_setToUCallBack is called with an action other than STOP
before a call is made to this API, consumed
and source
should point to the same place (unless target
ends with an imcomplete sequence of bytes and flush
is FALSE
). the target
buffer buffer needs to be a least the size of the maximum # of bytes per characters allowed by the target codepage.
converter | the Unicode converter |
converter | the Unicode converter |
target |
: I/O parameter. Input : Points to the beginning of the buffer to copy codepage characters to. Output : points to after the last codepage character copied to target . |
targetLimit |
the pointer to the end of the target array |
source | the source Unicode character array |
sourceLimit | the pointer to the end of the source array |
offsets |
if NULL is passed, nothing will happen to it, otherwise it needs to have the same number of allocated cells as target . Will fill in offsets from target to source pointer e.g: offsets[3] is equal to 6, it means that the target[3] was a result of transcoding source[6] For output data carried across calls -1 will be placed for offsets. |
flush |
TRUE if the buffer is the last buffer of the conversion interation and the conversion will finish with this call, FALSE otherwise. |
err |
the error status. U_ILLEGAL_ARGUMENT_ERROR will be returned if the converter is NULL . |
U_CAPI void U_EXPORT2 ucnv_toUnicode (UConverter * converter, UChar ** target, const UChar * targetLimit, const char ** source, const char * sourceLimit, int32_t * offsets, bool_t flush, UErrorCode * err) |
Converts an array of codepage characters into an array of unicode characters.
The source pointer is an I/O parameter, it starts out pointing at the place to begin translating, and ends up pointing after the first sequence of the bytes that it encounters that are semantically invalid. if ucnv_setFromUCallBack is called with an action other than STOP before a call is made to this API, consumed and source should point to the same place (unless target ends with an imcomplete sequence of bytes and flush is FALSE).
converter | the Unicode converter |
target | : I/O parameter. Input : Points to the beginning of the buffer to copy Unicode characters to. Output : points to after the last UChar copied to target. |
targetLimit | the pointer to the end of the target array |
source | the source codepage character array |
sourceLimit | the pointer to the end of the source array |
offsets |
if NULL is passed, nothing will happen to it, otherwise it needs to have the same number of allocated cells as target . Will fill in offsets from target to source pointer e.g: offsets[3] is equal to 6, it means that the target[3] was a result of transcoding source[6] For output data carried across calls -1 will be placed for offsets. |
flush | TRUE if the buffer is the last buffer and the conversion will finish in this call, FALSE otherwise. |
err |
the error code status U_ILLEGAL_ARGUMENT_ERROR will be returned if the converter is NULL , or if targetLimit and sourceLimit are misaligned. |
U_CAPI int32_t U_EXPORT2 ucnv_fromUChars (const UConverter * converter, char * target, int32_t targetCapacity, const UChar * source, UErrorCode * err) |
Transcodes the source Unicode string to the target string in a codepage encoding with the specified Unicode converter.
For example, if a Unicode to/from JIS converter is specified, the source string in Unicode will be transcoded to JIS encoding. The result will be stored in JIS encoding. if any problems during conversion are encountered it will SUBSTITUTE with the default (initial) substitute characters. This function is a more convenient but less efficient version of \Ref{ucnv_fromUnicode}.
converter | the Unicode converter |
source |
the source Unicode string (zero Terminated) |
target |
the target string in codepage encoding (not zero-terminated because some codepage do not use '\0' as a string terminator |
targetCapacity |
Input the number of bytes available in the target buffer |
err |
the error status code. U_INDEX_OUTOFBOUNDS_ERROR will be returned if the the # of bytes provided are not enough for transcoding. U_ILLEGAL_ARGUMENT_ERROR is returned if the converter is NULL or the source or target string is empty. U_BUFFER_OVERFLOW_ERROR when targetSize turns out to be bigger than targetCapacity |
targetCapacity
U_CAPI int32_t U_EXPORT2 ucnv_toUChars (const UConverter * converter, UChar * target, int32_t targetCapacity, const char * source, int32_t sourceSize, UErrorCode * err) |
Transcode the source string in codepage encoding to the target string in Unicode encoding.
For example, if a Unicode to/from JIS converter is specified, the source string in JIS encoding will be transcoded to Unicode and placed into a provided target buffer. if any problems during conversion are encountered it will SUBSTITUTE with the Unicode REPLACEMENT char We recomment, the size of the target buffer needs to be at least as long as the maximum # of bytes per char in this character set. A zero-terminator will be placed at the end of the target buffer This function is a more convenient but less efficient version of \Ref{ucnv_toUnicode}.
converter | the Unicode converter |
source | the source string in codepage encoding |
target | the target string in Unicode encoding |
targetCapacity | capacity of the target buffer |
sourceSize |
: Number of bytes in source to be transcoded |
err |
the error status code U_MEMORY_ALLOCATION_ERROR will be returned if the the internal process buffer cannot be allocated for transcoding. U_ILLEGAL_ARGUMENT_ERROR is returned if the converter is NULL or if the source or target string is empty. U_BUFFER_OVERFLOW_ERROR when the input buffer is prematurely exhausted and targetSize non-NULL . |
U_CAPI UChar U_EXPORT2 ucnv_getNextUChar (UConverter * converter, const char ** source, const char * sourceLimit, UErrorCode * err) |
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 * err) |
U_CAPI int32_t U_EXPORT2 ucnv_flushCache (void) |
SYSTEM API Iterates through every cached converter and frees all the unused ones.
U_CAPI const char *U_EXPORT2 ucnv_getAvailableName (int32_t index) |
provides a string containing the internal name (based on the alias file) of the converter.
given an index.
index |
the number of converters available on the system ([0..ucnv_countAvaiable()] ) |
NULL
if the index is out of bounds. U_CAPI int32_t U_EXPORT2 ucnv_countAvailable (void) |
returns the number of available converters.
U_CAPI uint16_t ucnv_countAliases (const char * alias, UErrorCode * pErrorCode) |
Gives the number of aliases for given converter or alias name.
alias | alias name |
pErrorCode | result of operation |
U_CAPI const char * ucnv_getAlias (const char * alias, uint16_t index, UErrorCode * pErrorCode) |
Gives the name of the alias at given index of alias list.
alias | alias name |
index | indes in alias list |
pErrorCode | result of operation |
U_CAPI void ucnv_getAliases (const char * alias, const char ** aliases, UErrorCode * pErrorCode) |
Fill-up the list of alias names for the given alias.
alias | alias name |
aliases |
fill-in list, aliases is a pointer to an array of ucnv_countAliases() string-pointers (const char * ) that will be filled in |
pErrorCode | result of operation |
U_CAPI const char *U_EXPORT2 ucnv_getDefaultName (void) |
returns the current default converter name.
NULL
is returned U_CAPI void U_EXPORT2 ucnv_setDefaultName (const char * name) |
sets the current default converter name.
The lifetime of the return ptr is that of the library
name: | the converter name you want as default (has to appear in alias file) |
U_CAPI void U_EXPORT2 ucnv_fixFileSeparator (const UConverter * cnv, UChar * source, int32_t sourceLen) |
Fixes the backslash character mismapping.
For example, in SJIS, the backslash character in the ASCII portion is also used to represent the yen currency sign. When mapping from Unicode character 0x005C, it's unclear whether to map the character back to yen or backslash in SJIS. This function will take the input buffer and replace all the yen sign characters with backslash. This is necessary when the user tries to open a file with the input buffer on Windows.
source | the input buffer to be fixed |
sourceLength | the length of the input buffer |
U_CAPI bool_t U_EXPORT2 ucnv_isAmbiguous (const UConverter * cnv) |
Determines if the converter contains ambiguous mappings of the same character or not.
U_CDECL_BEGIN typedef void (* UConverterToUCallback)(UConverter *, UChar **, const UChar *, const char **, const char *, int32_t* offsets, bool_t, UErrorCode *) |