Entering content frame

 UNICODE Data Types 

The C/C++ precompiler provides predefined data types for working with UNICODE data.

The table gives you an overview of these UNICODE data types:

Description

C/C++ Data Type

MaxDB Data Type

Unicode character string with closing NULL byte

The basic C/C++ data type is unsigned short.

In UCS 2, the characters are coded in a platform-specific byte configuration.

SQLUCS2*
SQLUCS2 [n+2], n < 4000
SQLUSC2 [n+2], n
³ 4000


CHAR (n) UNICODE, VARCHAR (n) UNICODE
LONG UNICODE

Unicode character string with closing NULL byte

The basic C/C++ data type is unsigned short.

In UTF 16 without surrogate, the characters are coded in a platform-specific byte configuration.

SQLUTF16*
SQLUTF16 [n+2], n < 4000
SQLUTF16 [n+2], n
³ 4000


CHAR (n) UNICODE, VARCHAR (n) UNICODE
LONG UNICODE

Generic data type

CHAR or SQLUCS2 data type, depending on the precompiler option –G unicode.

TCHAR*
TCHAR [n+1], n < 4000
TCHAR [n+1], n
³ 4000

CHAR (n) UNICODE, VARCHAR (n) UNICODE
LONG UNICODE

See also: Converting Data Types

 

 

Leaving content frame