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

Documentation

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 ucnv_toUnicode.
Returns:
the number of UChar needed in target (including the zero terminator)
Parameters:
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.
See Also:
ucnv_getNextUChar
ucnv_toUnicode
ucnv_convert

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de