Symbian3/SDK/Source/GUID-A60BFFE4-E527-547C-AF4D-30BB7A1C0D07.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Tue, 20 Jul 2010 12:00:49 +0100
changeset 13 48780e181b38
parent 0 89d6a7a84779
permissions -rw-r--r--
Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.

<?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-A60BFFE4-E527-547C-AF4D-30BB7A1C0D07" xml:lang="en"><title>Text
and binary data</title><shortdesc>Describes how C strings are handled in text and binary data.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>In ‘C’, strings are characterised by the need for a zero terminator to
flag the end of the string. They suffer from a number of problems. In particular,
they cannot include binary data within them (in case that data includes binary
zeroes) and operations on them are, in general, inefficient. ‘C’ strings need
to be handled in a different way to binary data, as reflected in the <codeph>memxxx()</codeph> and <codeph>strxxx()</codeph> function
groups in the ANSI ‘C’ library.</p>
<p>Descriptors allow strings and binary data to be represented in the same
way; this allows the same functions to be used in both cases.</p>
<p>For binary data, the 8 bit descriptors should be used explicitly. The distinction
between Unicode and non-Unicode has no meaning for binary data</p>
<p>Note that there is no practical use for explicit 16 bit binary data.</p>
</conbody></concept>