[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'DB' (#fcl)

# TFieldDef.CharSize

Character size

## Declaration

Source position: db.pas line 192

`public property TFieldDef.CharSize : Word read GetCharSize;`

## 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

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

Documentation generated on: May 14 2021