

#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 Shift_JIS 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 string failed. |
| src_len | This pointer takes the number of remaining unconverted characters indicated by src, and returns the number of characters that were actually required for conversion. Note: The number of characters is not equivalent to the byte size. |
Returns STD_RESULT_SUCCESS if conversion succeeds. Otherwise, returns STD_RESULT_CONVERSION_FAILED.
Store and return the number of characters that were actually used in conversion in the arguments dst_len and src_len.
The callback function type configured with the STD_ConvertStringUnicodeToSjis function. This function is called every time a character that cannot be converted inside the STD_ConvertStringUnicodeToSjis function is detected. The conversion process can be freely defined at this point.
A four-character array is always provided for dst. Use it to store characters that result from conversion. You do not need to append a null terminator.
The number of characters in src to be read for the current conversion is stored in src_len.
(Note: The number of characters is not equivalent to the byte size.)
If the result of conversion is continually two or more characters and either src or dst exceed the end of buffer, the conversion results are ignored and this function assumes the end was reached.
STDResult
STD_ConvertStringUnicodeToSjis
2006/08/10 Changed the interface.
2006/07/24 Changed the interface. Added a description of restrictions on return values.
2006/07/05 Initial version.
CONFIDENTIAL