Symbian3/SDK/Source/GUID-DF4C1226-E4D1-5701-BA55-8701754129D1.dita
author Graeme Price <GRAEME.PRICE@NOKIA.COM>
Fri, 15 Oct 2010 14:32:18 +0100
changeset 15 307f4279f433
parent 0 89d6a7a84779
permissions -rw-r--r--
Initial contribution of the Adaptation Documentation.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-DF4C1226-E4D1-5701-BA55-8701754129D1" xml:lang="en"><title>Overriding
the Charset when Reading Email Message Data</title><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>This tutorial explains how to override the charset when reading email message
data. </p>
<p>If the email message is stored in 8-bit format, the email application can
retrieve the data stored using a new charset that is set by it. </p>
<section><title>Procedure</title><p><b>Messages stored as rich text </b></p><p>For
retrieving the message body text that has been stored in 8-bit and rich text
format with a new character set using the <codeph>RestoreBodyTextL()</codeph> function,
complete the following steps: </p><ol>
<li id="GUID-F9F5EBB4-C09B-40F1-BAE4-20DB495044F5"><p>Use the <codeph>TMsvId aMessageId</codeph> parameter of the message
body text to get the <xref href="GUID-85BBE389-81F7-3E2F-A789-446D9BE2CC49.dita"><apiname>CMsvEntry</apiname></xref> class. </p></li>
<li id="GUID-E448097D-42F4-4C71-95A6-EC0A3B1AAFEE"><p>Use the <xref href="GUID-85BBE389-81F7-3E2F-A789-446D9BE2CC49.dita#GUID-85BBE389-81F7-3E2F-A789-446D9BE2CC49/GUID-78A5A0B1-58D8-392B-90C2-6F68B92F0BD1"><apiname>CMsvEntry::ReadStoreL()</apiname></xref> method to get the <xref href="GUID-8CB90FA2-A6CF-3FA2-81FF-7D22EFD9C2CE.dita"><apiname>CMsvStore</apiname></xref> class.</p></li>
<li id="GUID-6B63A1C9-1BA5-458C-94F3-539FFDD35F3C"><p>Call the<xref href="GUID-8CB90FA2-A6CF-3FA2-81FF-7D22EFD9C2CE.dita#GUID-8CB90FA2-A6CF-3FA2-81FF-7D22EFD9C2CE/GUID-8825B8E5-0285-3F0B-965D-D67F0F767D1B"><apiname>CMsvStore::RestoreBodyTextL()</apiname></xref> method that
takes <codeph>CRichText&amp; aRichTextBody</codeph> and TUint aCharsetOverride<codeph/> parameters.</p></li>
<li id="GUID-95BBBF38-739A-44FB-8FE2-B3E10DB57DF1"><p>Pass the new charset, with which to retrieve the body text as<codeph> TUint
aCharsetOverride</codeph> parameter.</p></li>
</ol><p><b>Messages stored as plain text</b></p><p>For retrieving the message
body text that has been stored in 8-bit and plain text format with a new character
set using the RestoreBodyTextL() function, complete the following steps:</p><ol>
<li id="GUID-52D0EB1B-E07B-4199-AEE3-E97B426C7E13"><p>Use the <codeph>TMsvId aMessageId</codeph> parameter of the message
body text to get the <xref href="GUID-85BBE389-81F7-3E2F-A789-446D9BE2CC49.dita"><apiname>CMsvEntry</apiname></xref> class.</p></li>
<li id="GUID-104D76F3-BACD-4B3A-97CD-F9EA83730297"><p>Use the <xref href="GUID-85BBE389-81F7-3E2F-A789-446D9BE2CC49.dita#GUID-85BBE389-81F7-3E2F-A789-446D9BE2CC49/GUID-78A5A0B1-58D8-392B-90C2-6F68B92F0BD1"><apiname>CMsvEntry::ReadStoreL()</apiname></xref> function to get
the <xref href="GUID-8CB90FA2-A6CF-3FA2-81FF-7D22EFD9C2CE.dita"><apiname>CMsvStore</apiname></xref> class. </p></li>
<li id="GUID-E8FBD78C-D146-486D-8E29-C4B3BD2CB7D5"><p>Call the <xref href="GUID-8CB90FA2-A6CF-3FA2-81FF-7D22EFD9C2CE.dita#GUID-8CB90FA2-A6CF-3FA2-81FF-7D22EFD9C2CE/GUID-E07EE775-D4D0-37B7-8693-4EF4291BC648"><apiname>CMsvStore::InitialisePlainBodyTextForReadL()</apiname></xref> function
to get the <xref href="GUID-6A4CAFB0-262A-3721-B91B-07F2C3B64B5F.dita"><apiname>CMsvPlainBodyText</apiname></xref> object.</p></li>
<li id="GUID-6A86131B-98A8-427A-A94E-6594F44021B1"><p>Call the<xref href="GUID-6A4CAFB0-262A-3721-B91B-07F2C3B64B5F.dita#GUID-6A4CAFB0-262A-3721-B91B-07F2C3B64B5F/GUID-DC734608-1B80-3B1F-975A-FB0645A2880B"><apiname> CMsvPlainBodyText::SetCharacterSetL()</apiname></xref> function
with the new charset ID with which to retrieve the body text.</p></li>
<li id="GUID-21F46292-7A8D-4078-B5FB-47F2EE21EF00"><p>Call the <xref href="GUID-6A4CAFB0-262A-3721-B91B-07F2C3B64B5F.dita#GUID-6A4CAFB0-262A-3721-B91B-07F2C3B64B5F/GUID-7EE4AF2A-6DD6-399A-A9F6-6192107A9CA9"><apiname>CMsvPlainBodyText::NextChunkL()</apiname></xref> function
or the <xref href="GUID-6A4CAFB0-262A-3721-B91B-07F2C3B64B5F.dita#GUID-6A4CAFB0-262A-3721-B91B-07F2C3B64B5F/GUID-623D0A28-59AD-37B4-A7C1-80A94BF3FDA3"><apiname>CMsvPlainBodyText::PreviousChunkL()</apiname></xref> function
to get the body text in chunks.</p></li>
</ol></section>
</conbody><related-links>
<link href="GUID-2C8653F9-8873-59E8-9FD2-4215F6877ABC.dita"><linktext>Chunk Method
to Process Emails</linktext></link>
<link href="GUID-D73AD200-BE4D-50BF-BCF9-14627DE530B7.dita"><linktext>Imap4Example:
An Email manager using IMAP4 and SMTP</linktext></link>
<link href="GUID-BB35DBCC-FE56-547F-BADA-9EF854691ADC.dita"><linktext>Pop3Example:
An Email manager using POP3 and SMTP</linktext></link>
</related-links></concept>