STD_ConvertCharUnicodeToSjis

Syntax

#include <nitro/std.h>

inline int STD_ConvertCharUnicodeToSjis(char *dst, u16 src);

Arguments

dst Shift-JIS string buffer that will contain the converted characters.
Specify a buffer that has been allocated with at least a 2-byte region.
src The Unicode format character to be converted

Return Values

If the conversion is successful, the converted number of bytes (=1 or 2) will return. If the conversion fails, a -1 will return.

Description

This function converts a Unicode-format character to a ShiftJIS-format character.
STD_ConvertStringUnicodeToSjis is called internally, and only one character is converted.
If the ShiftJIS character after conversion is a two-byte character, it will be necessary to pass a buffer to dst for which two or more bytes have been allocated.
If it is unclear whether the character is single- or double-byte after conversion, be sure to pass a buffer of at least 2 bytes.

See Also

STD_ConvertStringUnicodeToSjis

Revision History

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


CONFIDENTIAL