STD_ConvertStringSjisToUnicode

C Specification

#include <nitro/std.h>

STDResult STD_ConvertStringSjisToUnicode(u16 *dst, int *dst_len, const char *src, int *src_len, STDConvertUnicodeCallback callback);

Arguments

dst Unicode character string buffer for storing the converted string
If NULL is specified the storing process is ignored.
dst_len Passing the maximum number of characters that can be stored in the conversion destination buffer, this pointer accepts the number of characters actually stored.
Be sure to note that the number of characters does not give the byte size.
Ignored when NULL is specified.
src Source ShiftJIS string buffer
src_len Passing the maximum byte size that can be converted, this pointer accepts the byte size actually converted.
If the value passed is negative or if NULL is specified, it is treated as though the length up to the end of src has been specified.
callback This designates the callback that will be called if there are any characters that can't be converted.

Return Values

Returns an STDResult type value that gives the result of the conversion. If dst is other than NULL, the converted character string is stored in dst and the number of characters after conversion is returned in src_len and dst_len.
If dst is NULL, only the number of characters after conversion is returned without storing the converted string.
The NULL terminator '\0' is not given or included in the character count.

Description

This function converts a ShiftJIS-format character string to a Unicode-format character string.
If the API finds ShiftJIS-format characters that it cannot convert, it will generate a callback each time.
If NULL is used to specify the callback, processing will terminate when a character that cannot be converted appears.

If NULL is specified for dst, only the character length after conversion can be found.

See Also

STDResult
STD_ConvertCharSjisToUnicode, STD_ConvertStringUnicodeToSjis, STD_ConvertCharUnicodeToSjis, STDConvertUnicodeCallback

Revision History

08/10/2006 Changed the interface.
07/24/2006 Changed the interface.
07/05/2006 Initial version.


CONFIDENTIAL