#include <nitro/std.h>
typedef STDResult (*STDConvertSjisCallback) (char *dst, int *dst_len, const u16 *src, int *src_len);
dst | Pointer to the location storing the converted ShiftJIS character. |
dst_len | Accepting the maximum byte size that can be stored in the destination buffer, this pointer returns the byte size actually stored. |
src | Pointer to the location where conversion of the Unicode character string failed. |
srclen | Accepting the remaining number of unconverted characters pointed to by src, this pointer returns the number of characters 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 the callback function configured with STD_ConvertStringUnicodeToSjis
.
This callback is called every time a character that cannot be converted by the functionSTD_ConvertStringUnicodeToSjis
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 number of characters in one character's worth of src to be read for conversion in srclen. (Note that the number of characters does not give the byte size.)
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_ConvertStringUnicodeToSjis
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