Symbian3/SDK/Source/GUID-214A7085-185B-5D40-A613-E82E68968AAB.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 xml:lang="en" id="GUID-214A7085-185B-5D40-A613-E82E68968AAB"><title>Cnvtool Command Syntax</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>The <filepath>cnvtool</filepath> utility creates a C++ file which contains the character set conversion data (in an <codeph>SCnvConversionData</codeph> struct) and optionally a function returning the replacement for unconvertible Unicode characters. Both are used in a Charconv plug-in DLL. </p> <section><title>Descriptions</title> <p>The input to <filepath>cnvtool</filepath> are two text files which are known as the source file and the control file. The source file contains a table of pairs of hexadecimal numbers. The first number in each pair is the encoding of a character in the foreign character set, and the second is the Unicode encoding of the same character. The control file specifies the conversion algorithms to convert (both ways) between ranges of characters, and other information. </p> <p>The <codeph>SCnvConversionData</codeph> data structure and the optional function generated by the tool can be accessed from hand-written C++ code. </p> <p>The <filepath>cnvtool</filepath> -generated C++ file is compiled along with the hand-written C++ file to <xref href="GUID-E8EF06D7-FB4E-598D-9D9D-4395AB6F51C8.dita">create a Charconv plug-in DLL</xref>. </p> </section> <section><title>Syntax</title> <p> <b> Invocation syntax </b>  </p> <p> <codeph>cnvtool -generateSourceCode</codeph> <varname>control-file</varname>  <varname>source-file</varname> <varname>output-file</varname> [<codeph>options</codeph>] </p> <p> <b>Arguments </b>  </p> <table id="GUID-CABD8A7C-5428-5032-A6E9-B02AD8A5C43A"><tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/><tbody><row><entry><p> <codeph>-generateSourceCode</codeph>  </p> </entry> <entry><p>This must be specified. </p> </entry> </row> <row><entry><p> <varname>control-file</varname>  </p> </entry> <entry><p>The filename of the control file. </p> </entry> </row> <row><entry><p> <varname>source-file</varname>  </p> </entry> <entry><p>The filename of the source text file. </p> </entry> </row> <row><entry><p> <varname>output-file</varname>  </p> </entry> <entry><p>The filename of the generated cpp file. </p> </entry> </row> <row><entry><p>[<codeph>options</codeph>] </p> </entry> <entry><p>See table below. </p> </entry> </row> </tbody> </tgroup> </table> <p> <b>Optional arguments</b>  </p> <p>The optional arguments may be positioned anywhere in the parameter list. Each has a short and a long form, as shown in the table below separated by a '<codeph>|</codeph>'. </p> <table id="GUID-780A0C08-169F-59BC-AE0A-D9093C318ACC"><tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/><tbody><row><entry><p> <codeph>-c</codeph> | <codeph>-columns</codeph> (<varname>number-of-columns</varname>: <varname>column-of-foreign-character-set-codes</varname>, <varname>column-of-Unicode-codes</varname>) </p> </entry> <entry><p>This must be used if the source file consists of a non-standard number of columns, or if the columns are in a non-standard order. 1 (rather than 0) is the first column. If this flag is not used, then <codeph>-columns(2:
                  1, 2)</codeph> is assumed. </p> </entry> </row> <row><entry><p> <codeph>-r |
                  -omitReplacementForUnconvertibleUnicodeCharacters</codeph>  </p> </entry> <entry><p>This must be specified if the replacement for unconvertible Unicode characters specified in the control file is not going to be used by the plug-in DLL. </p> </entry> </row> <row><entry><p> <codeph>-p |
                  -cutOutAnyPrivateUseUnicodeCharacterSlotsBeingUsed</codeph>  </p> </entry> <entry><p>If this is not used and one or more private-use Unicode character slots are being used, a warning is generated. </p> </entry> </row> <row><entry><p> <codeph>-u | -sourceFilesToSubtract</codeph> (<varname>source-file-1</varname>, <varname>source-file-2</varname>, ...) </p> </entry> <entry><p>This is for use when only a subset of the source file is to be used; the conversion pairs contained in the source files listed under this flag being subtracted from the conversion pairs obtained from the actual source file. </p> </entry> </row> </tbody> </tgroup> </table> </section> </conbody></concept>