Symbian3/PDK/Source/GUID-A60BFFE4-E527-547C-AF4D-30BB7A1C0D07.dita
author Graeme Price <GRAEME.PRICE@NOKIA.COM>
Fri, 15 Oct 2010 14:32:18 +0100
changeset 15 307f4279f433
parent 14 578be2adaf3e
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-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>