Product Documentation

c-treeDB API for C++ - Developers Guide

Previous Topic

Next Topic

Specifying a Unicode Key Segment with CTSEG_UNCSEG

If a key segment is a Unicode segment, but the segment mode is not one of the CTSEG_SCHSEG modes or the segment field is not one of the Unicode field types, the segment mode must also specify the Unicode segment modifier CTSEG_UNCSEG. For example, assume the CT_FSTRING field contains a UTF-8 string:

Notice an Extended Key Segment definition must be created for the segment. Please refer to section Extended Key Segment Definition below. If no extended key segment definition is provided at the time of the table creation, c-treeDB will create an extended key segment with default values. Please refer to the Default Extended Key Segment Definition section below.

Previous Topic

Next Topic

CTSEG_UNCSEG C++ API Example

hField = hTable.AddField( "customer", CT_FSTRING, 40);

hTable.AddSegment(0, hField, CTSEG_SCHSEG | CTSEG_UNCSEG);

TOCIndex