1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META http-equiv="Content-Style-Type" content="text/css">
6<TITLE>NWC24SetMsgText</TITLE>
7<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css">
8</HEAD>
9<BODY>
10<H1>NWC24SetMsgText</H1>
11
12<H2>C Specification</H2>
13<DL>
14  <DD><PRE><CODE>#include &lt;revolution/nwc24.h&gt;</CODE></PRE>
15  <DD><PRE><CODE><A HREF="../Types/NWC24Err.html">NWC24Err</A> NWC24SetMsgText(
16    <A HREF="../Types/NWC24MsgObj.html">NWC24MsgObj</A>*  <EM>obj</EM>,
17    const char*   <EM>text</EM>,
18    u32           <EM>size</EM>,
19    <A HREF="../Types/NWC24Charset.html">NWC24Charset</A>  <EM>charset</EM>,
20    <A HREF="../Types/NWC24Encoding.html">NWC24Encoding</A> <EM>encoding</EM>
21);</CODE></PRE>
22</DL>
23
24<H2>Description</H2>
25<P>
26Specifies the body text of the message with a character string.
27</P>
28<P>
29Specifies character code format and MIME encoding type as an argument. The character code format indicates the character code used for the sent text. It is used to convert that text into a displayable format when the message is received. In addition, the MIME encoding type specifies the encoding method when transferring the text. MIME encoding is carried out inside the library.
30</P>
31<P>
32When the body comprises text that can all be 7-bit encoded, <CODE>NWC24_ENC_7BIT</CODE> is specified, and it can be sent without MIME encoding. If character codes that require 8-bit representation are to be mixed in, you must specify <CODE>NWC24_ENC_BASE64</CODE> or <CODE>NWC24_ENC_QUOTED_PRINTABLE</CODE> and perform MIME encoding. In addition, if message is to be sent only to a local console message box, you can specify the <CODE>NWC24_ENC_8BIT</CODE> format, which does not perform MIME encoding.
33</P>
34
35<TABLE border="1" width="80%">
36  <TBODY>
37    <TR>
38      <TD width="100%">
39Example <BR> When sending English text consisting of only ASCII code: <BR><CODE>&nbsp;&nbsp;charset = NWC24_US_ASCII / encoding = NWC24_ENC_7BIT</CODE><BR> <BR> When sending Japanese text consisting of ISO-2022-JP code: <BR><CODE>&nbsp;&nbsp;charset = NWC24_ISO_2022_JP / encoding = NWC24_ENC_7BIT</CODE><BR> MIME encoding is not needed for ISO-2022-JP as it is a 7-bit capable format.<BR><BR> When sending European text consisting of ISO-8859-1 character code:<BR> <CODE>&nbsp;&nbsp;charset = NWC24_ISO_8859_1 / encoding = NWC24_ENC_QUOTED_PRINTABLE</CODE><BR> Since the ISO-8859 character codes includes characters that cannot be expressed in 7-bits, a different format must be specified. In this situation, Quoted-Printable MIME encoding is usually appropriate.<BR><BR><BR> If sending a string in UTF-16 character code supporting multiple languages (for example to the Wii Message Board):<BR><BR> <CODE>&nbsp;&nbsp;charset = NWC24_UTF_16 / encoding = NWC24_ENC_BASE64</CODE><BR>UTF-16 is not based on 7-bit expressions, so apply Base64 format MIME encoding.<BR>
40      </TD>
41    </TR>
42  </TBODY>
43</TABLE>
44
45
46<BR>In addition, the lines of text must be no longer than 998 characters. CRLF (0x0D, 0x0A) must be used as the newline code.
47</P>
48
49<P>
50The buffer given by the <CODE><EM><STRONG>text</STRONG></EM></CODE> argument must not be freed until <A HREF="NWC24CommitMsg.html"><CODE>NWC24CommitMsg()</CODE></A> is called and creation of the message is complete.</P>
51
52<H2>Arguments</H2>
53<TABLE border="1" cellpadding="3" cellspacing="0.1">
54  <TR>
55<TD width="120" bgcolor="#ffffe8"><code><em><strong>obj</strong></em></code></TD>
56    <TD width="520">
57Pointer to the message object to be set.
58    </TD>
59  </TR>
60  <TR>
61<TD width="120" bgcolor="#ffffe8"><code><em><strong>text</strong></em></code></TD>
62    <TD width="520">
63Pointer to the message body string.
64    </TD>
65  </TR>
66  <TR>
67<TD width="120" bgcolor="#ffffe8"><code><em><strong>size</strong></em></code></TD>
68    <TD width="520">
69Length (in bytes) of the string specified in <code><em><strong>text</strong></em></code>.
70    </TD>
71  </TR>
72  <TR>
73<TD width="120" bgcolor="#ffffe8"><code><em><strong>charset</strong></em></code></TD>
74    <TD width="520">
75Character code (Charset) format.
76    </TD>
77  </TR>
78  <TR>
79<TD width="120" bgcolor="#ffffe8"><code><em><strong>encoding</strong></em></code></TD>
80    <TD width="520">
81MIME encoding type.
82    </TD>
83  </TR>
84</TABLE>
85
86<h2>Return Values</h2>
87<P>
88<code>NWC24_OK</code>: Normal termination.<BR> <code>NWC24_ERR_PROTECTED</code>: Cannot change message object.<BR> <code>NWC24_ERR_INVALID_VALUE</code>: Invalid value specified for <code><em><strong>charset</strong></em></code> or <code><em><strong>encoding</strong></em></code>.<BR> <code>NWC24_ERR_NOT_SUPPORTED</code>: A non-supported <code><em><strong>encoding</strong></em></code> format has been specified for the message. <BR>  <code>NWC24_ERR_FORMAT</code>: The length of the message exceeds the allowable range.<BR>
89</P>
90
91<H2>See Also</H2>
92<P>
93<A href="NWC24InitMsgObj.html"><CODE>NWC24InitMsgObj</CODE></A>
94</P>
95
96<H2>Revision History</H2>
97<P>
982007/06/13 Updated the settings example, deleted <code>NWC24_ERR_STRING_END</code> from the Return Values and added <code>NWC24_ERR_NOT_SUPPORTED</code>.<BR>2007/05/03 Revised the description of <code><em><strong>size</strong></em></code>.<BR>2006/12/05 Made corrections.<BR>2006/11/13 Added descriptions about handling buffers and the <CODE>NWC24_ERR_FORMAT </CODE>error code.<BR>2006/10/10 Made revisions in line with support for MIME encoding inside the library.<BR>2006/10/06 Updated the list of return values.<BR>2006/08/01 Initial version.
99</P>
100
101<hr><p>CONFIDENTIAL</p></body>
102</HTML>