# STDConvertUnicodeCallback

## Definition

  `#include <nitro/std.h>`

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

## Arguments

`dst` | Pointer to the location of 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. Note that this is not equal to the byte size.
`src` | Pointer to the location where conversion of the Shift_JIS string failed.
`srclen` | Accepting the remaining unconverted byte size that `src` points to, this pointer returns the byte size actually required for conversion.

## Return Values

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 arguments `dst_len` and `src_len`.

## Description

The type of the callback function configured with the `STD_ConvertStringSjisToUnicode` function. This callback is called every time a character that cannot be converted by the `STD_ConvertStringSjisToUnicode` function is detected. Conversion processing can be freely defined here.
A four-character array is always guaranteed for `dst`. 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 buffer, the result will be ignored and will be treated as if the end of buffer has been reached.

## See Also

`STDResult`
`STD_ConvertStringSjisToUnicode`

## Revision History

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