1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 8.0.2.0 for Windows"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<title>STD_ConvertCharUnicodeToSjis</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">STD_ConvertCharUnicodeToSjis<img src="../../image/NTR.gif"align="middle"><img src="../../image/TWL.gif" align="middle"></h1> 15<h2>Syntax</h2> 16<dl> 17 <dd><PRE><CODE>#include <nitro/std.h> 18 19inline int STD_ConvertCharUnicodeToSjis(char *dst, u16 src);</CODE></PRE></dd> 20</dl> 21 22<h2>Arguments</h2> 23<table border="1" width="100%"> 24 <tbody> 25 <TR> 26 <TD width="20%"><EM><STRONG>dst</STRONG></EM></TD> 27 <TD width="80%">Shift-JIS string buffer that will contain the converted characters.<BR> 28 Specify a buffer that has been allocated with at least a 2-byte region.</TD> 29 </TR> 30 <TR> 31 <TD width="20%"><EM><STRONG>src</STRONG></EM></TD> 32 <TD width="80%">The Unicode format character to be converted</TD> 33 </TR> 34 <TR> 35 </tbody> 36</table> 37 38<h2>Return Values</h2> 39<p> 40If the conversion is successful, the converted number of bytes (=1 or 2) will return. If the conversion fails, a -1 will return. 41</p> 42 43<H2>Description</H2> 44<P> 45This function converts a Unicode-format character to a ShiftJIS-format character.<BR><CODE><A href="STD_ConvertStringUnicodeToSjis.html">STD_ConvertStringUnicodeToSjis</A></CODE> is called internally, and only one character is converted.<BR>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. <BR>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. 46 47</P> 48 49<h2>See Also</h2> 50<p><CODE><A href="STD_ConvertStringUnicodeToSjis.html">STD_ConvertStringUnicodeToSjis</A></CODE></p> 51 52<H2>Revision History</H2> 53<P> 542006/07/24 Changed the interface.<br>2006/07/05 Initial version. 55</P> 56<hr><p>CONFIDENTIAL</p></body> 57</html> 58