Designates the encoded unit in which a codepoint is stored.
# Metadata
Platforms: desktop, server, mobile OS: mac, windows, linux, ios, android Introduced: 7.0 Security:
# Syntax
codeunit
# Examples
get codeunit 1 of tString
get the first codeunit of tString
# Description
A codeunit is the encoded units in which codepoints are stored (e.g. 16 bit words in UTF-16 or 8-bit bytes in UTF-8). Although the engine currently uses UTF-16 for storage of Unicode text, this should not be relied upon. The byte order of the codeunits depends on the platform and it is not guaranteed that the engine will always use UTF-16 for text storage.
The hierarchy of the new and altered chunk types is as follows:
byte w of codeunit x of codepoint y of char z of word ...
>*Note:* This chunk type is not of general utility.
# Tags
# See
- **keyword:** characters, codepoint, codeunits, character, codepoints, bytes, byte - **glossary:** keyword