Skip to content

TFieldDef.CharSize

Character size.

Declaration

Source position: db.pas line 208

public property CharSize: Word;

Description

CharSize is only relevant for for string fields: it indicates the number of bytes used to represent a single character. It is calculated from the TFieldDef.CodePage property and can have the following values:

  • 1 for single-byte string fields
  • 2 for UnicodeString fields
  • 4 for UTF8 strings

See also

Name Description
TFieldDef.CodePage System code page for the values in string and wide string field types.
TFieldDef.Size Size of the buffer needed to store the data of the field.