Edit

ByteLength (text)

Result type:  number

Definition:  Returns the length, in bytes (reflecting the utf-8 encoding of non-ASCII characters), of a string. This may be different from Length() which returns the length in characters.

Example:  ByteLength("™") — returns 3 (whereas Length("™") is 1).

Availability:  available within MWScript handlers.