Creating a Custom Character Map (lkt_create_charmap)

The following functions create a new custom character map. Character maps created under a user transaction might not be used in table creation outside that transaction until the transaction is committed.

dvkerr_t lkt_create_charmap(lpar_t host, lpar_t mapname, lpar_t mapdef );
dvkerr_t lkt_create_charmapT(lpar_t host, lpar_t mapname, lpar_t tran,
lpar_t mapdef );

Input

host (optional)

This is used to identify the server. For more information, see Communicating with TIBCO Patterns Servers

mapname (required)

is the name of the character map. It is specified using (LPAR_STR_CHARMAP).

mapdesc (optional)

If given this must be a list containing one or more of:

LPAR_INT_FOLDCLASS must be one of the following:
LKT_CCLASS_CASE fold letter case
LKT_CCLASS_DIACRITICS fold diacritic marks and normalize characters.
LPAR_LST_MAP defines a special character mapping. This list consists of exactly two items: a from character set and a to character set. The from character set is defined using one of three LPARs:
LPAR_INT_FROM_CLASS specifies that the from character set is a predefined class of characters. The currently defined classes that might be used are: LKT_CCLASS_WHITESPACE all white space characters, and LKT_CCLASS_PUNCTUATION all punctuation characters.
LPAR_BLK_FROM_CHARS contains a list of UTF-8 encoded characters that is the from character set.
LPAR_INTARR_FROM_UCODES contains a list of characters specified as Unicode Code Points.

The to character set is defined using one of two LPARs:

LPAR_BLK_TO_CHARS contains a list of UTF-8 encoded characters that is the to character set.
LPAR_INTARR_TO_UCODES contains a list of characters specified as Unicode Code Points.

If the from character set is defined as a class of characters the to character set must be a single character, otherwise it must be either a single character or have exactly the same number of characters as the from set. If the to character set is a single character all characters in the from set are mapped to that character, otherwise each character in the from set is mapped to the corresponding character in the to set.

The special value: LKT_CHAR_DELETE might be included as a Unicode Code Point in the to character set. This indicates that the from character is to be deleted instead of mapped.

Any number of entries might be given in the mapdesc list.

Default value: No mapping is performed.

tran (optional)

identifies the user transaction (LPAR_LONG_TRAN_ID) under which the charmap is to be created

 

Error codes and items returned by lkt_create_charmap

ARRAYLEN

array item with incorrect number of entries

CHARCONV

item with invalid UTF-8 encoded data

DBEXISTS

name of character map that already exists

HANDSHAKE

(none)

INTERNAL

(none)

IPCERR

(none)

IPCTIMEOUT

(none)

IPCEOF

(none)

PARAMCONFLICT

item which conflicts with an earlier item

PARAMMISSING

(none) or list with missing entry

PARAMVAL

item with invalid value

SRCHPARAM

unrecognized LPAR in map definition parameters

TRAN_UNKNOWN

lpar that contains the unknown transaction id

TRAN_IN_USE

lpar that contains the transaction id

TRANCONFLICT

list that contains LPAR_LONGINT_TRAN_ID and LPAR_STR_ERRORDETAILS