Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



The Snm File Generator


Introduction

snmtool is used to create plug-in data files (called snm files) which contain mappings between standard character set identifiers (which may either be names or MIB enums) and their corresponding Symbian UIDs.

The acronym snm stands for Standard Names and MIB enums. Snm files are used by several member functions of the CCnvCharacterSetConverter class, for instance ConvertStandardNameOfCharacterSetToIdentifierL() and ConvertMibEnumOfCharacterSetToIdentifierL().

snm files should be installed in the \system\charconv\ directory. Mappings for some common character sets are already provided, but more can be created.

The following steps need to be taken to create an snm file:

  1. Create the source snm file. This is a text file which defines the mapping between Symbian-specific character set UIDs and one or more standard names and/or MIB enums. See the following section for how this file should be formatted.

  2. Create the snm file by invoking snmtool on the source snm file.

  3. Install the generated snm file in the \system\charconv\ directory on any drive.

[Top]


The source snm file

The source file consists of zero, one or more blocks of information. The first line in each block has the format:

CharacterSet 0x<UID-in-hexadecimal>

The remainder of each block consists of zero, one or more lines, each of which is either in the format:

StandardName "<standard-name>"

or in the format:

MibEnum <MIB-enum-in-decimal>

For example, the following provides the mapping information for the Shift-JIS character set:

CharacterSet 0x10000fbd

StandardName "Shift_JIS"

StandardName "MS_Kanji"

StandardName "csShiftJIS"

MibEnum 17

The source snm file is case insensitive and permits comments beginning with a "#" and extending to the end of the line. It also permits blank lines and leading and trailing whitespace on non-blank lines.