The mnemonic.dat file contains POSIX mnemonic strings that can be used to replace unmappable source characters, if necessary, during character-set conversion.
mnemonic.dat contains only UCS-2 <-> mnemonic string conversions. Each Unicode mnemonic in the shipped mnemonic.dat file is a string of XPG4 characters representing a Unicode character. The mnemonic.dat file associates POSIX mnemonic strings with Unicode UCS-2 character encodings. Because the mnemonic strings use characters from the XPG4 Portable Character Set, the strings are suitable for use in any destination character set.
mnemonic.dat is located in the $SYBASE/config directory. See “Localization files” for a diagram of the $SYBASE/charsets directory structure.
mnemonic.dat is used only if the conversion configuration file (charset.cfg) for a destination character set specifies a mode of “Mnemonic.” If this is the case, then at conversion time mnemonic.dat is used as follows:
If a source character is found to be unmappable in the destination character set, Sybase software converts the source character to Unicode UCS-2.
Sybase looks up the UCS-2 encoding in mnemonic.dat and uses the mnemonic string associated with it in the destination data stream.
If mnemonic.dat does not contain a suitable string, a Unicode UCS-2 hexadecimal string is used in the destination data stream.
See the Open Client and Open Server International Developer’s Guide for a detailed description on the character-set conversion process.
mnemonic.dat contains entries that associate UCS-2 encodings with mnemonic strings.
Mnemonics section entries have the following form:
mnem = <mnem_string> <UCS-2_encoding> comment
where:
< is ignored.
mnem_string is the string of XPG4 characters representing the mnemonic string
> is the list separator character for the file.
UCS-2_encoding is the UCS-2 encoding for a character.
comment is a comment string.
Mnemonics section entries look somewhat different from entries in other Sybase localization files. This is because Sybase uses standard POSIX definitions in mnemonic.dat.
The following is an example of a mnemonics file fragment:
[file format]
version = 11.0
escape = /
list_separator = >
[copyright]
copyright = "Copyright ... ."
[mnemonics]
mnem = <NU> <U0000> NULL (NUL)
mnem = <SH> <U0001> START OF HEADINGS(SOH)
mnem = <SX> <U0002> START OF TEXT (STX)
mnem = <EX> <U0003> END OF TEXT (ETX)
mnem = <ET> <U0004> END OF TRANSMISSION (EOT)
mnem = <EQ> <U0005> ENQUIRY (ENQ)
mnem = <AK> <U0006> ACKNOWLEDGE (ACK)
mnem = <BL> <U0007> BELL (BEL)
mnem = <BS> <U0008> BACKSPACE (BS)
.
.
.
The mnemonic.dat file that Sybase ships does not contain strings for all characters in all character sets. Therefore, if mnemonic.dat does not contain a string that you need, you can insert the string using an operating system editor, such as vi.
The ftp site unicode.org has information on new Unicode mnemonic strings, as well as updates to existing strings.