PLC

WSTRING

Unlike the data type STRING (ASCII), the data type WSTRING is interpreted in Unicode format. This coding means that with WSTRING, the number of characters that can be displayed depends on which characters are to be displayed. With WSTRING, a length of 10 means that the length of the WSTRING can occupy a maximum of 10 WORDs. In Unicode, however, for some characters several WORDs are required for encoding a character, so that the number of characters does not have to correspond to the length of the WSTRING (10 in this case).

The data type requires 1 WORD per character and 1 WORD extra memory space. A STRING requires only 1 byte. The data type WSTRING is terminated with 0.

Example:

wsVar : WSTRING := "This is a WString";

See also:

STRING
STRING constants