#include <nitro/std.h>
typedef STDResult (*STDConvertUnicodeCallback) (u16 *dst, int *dst_len, const char *src, int *src_len);
dst | Pointer to the location storing the converted Unicode character. |
dst_len | Passing the maximum number of characters that can be stored in the conversion destination buffer, this pointer returns the number of characters actually stored. Be sure to note that the number of characters does not give the byte size. |
src | Pointer to the location where conversion of the ShiftJIS character string failed. |
srclen | Accepting the remaining unconverted byte size pointed to by src, this pointer returns the byte size actually required for conversion. |
Returns STD_RESULT_SUCCESS if conversion succeeds; otherwise, returns STD_RESULT_CONVERSION_FAILED.
Be sure to store the number of characters actually used in conversion in the argumens dst_len and src_len, respectively.
This is the type of callback function set by STD_ConvertStringSjisToUnicode
.
This callback is called every time a character that cannot be converted by the functionSTD_ConvertStringSjisToUnicode
is detected. Conversion processing can be freely defined here.
A four-character array is always guaranteed for dst. Be sure to store characters that result from conversion here. A NULL terminator does not need to be added.
Be sure to store the byte size for one character's worth of src to be read for conversion in srclen. If the result of conversion is two or more characters and either src or dst exceed the end of the buffer, the results of conversion will be ignored and it will be treated as if the end of buffer has been reached.
STDResult
STD_ConvertStringSjisToUnicode
08/10/2006 Changed the interface.
07/24/2006 Changed the interface. Added a description regarding restrictions on return values.
07/05/2006 Initial version.
CONFIDENTIAL