A UTF-8 encoded unicode character string of n characters, space-padded just as STRING is. If _n is omitted, the string is variable length to the size needed to contain the result of the cast or passed parameter. The optional locale specifies a valid unicode locale code, as specified in ISO standards 639 and 3166 (not needed if LOCALE is specified on the RECORD structure containing the field definition).

Type casting UTF8 to UNICODE, VARUNICODE, STRING, or DATA is allowed, while casting to any other type will first implicitly cast to STRING and then cast to the target value type.

The upper size limit for any UTF8 value is 4GB.


UTF8 FirstName := U8'NoŽl';                 // utf-8-encoded string
UTF8_de MyUnicodeString := U8'abcd\353';    // becomes 'abcdŽ' with a German locale
UTF8_4 FirstName4 := U8'NoŽl';              // 4-character utf-8-encoded string
UTF8_de_5 MyUnicodeString_de5 := U8'abcd\353'; // becomes 'abcdŽ' with a German locale