unicodeFormattedText

Typeproperty
DictionaryLCS
LibraryLiveCode Script
Syntax
set the unicodeFormattedText of [chunk of] field to string
get the unicodeFormattedText of [chunk of] field
Associationsfield
Summary

Unwraps hard-wrapped lines, or provides the hard-wrapped contents of a field.

Introduced4.6
DeprecatedIn LiveCode 7.0 the language was changed to handle unicode transparently. This means that language functionality which previously aided unicode text manipulation is no longer required.
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Example
write the unicodeFormattedText of field 1 to file myTextFile
get the unicodeFormattedText of line 1 of field "exampleText"
Values
NameTypeDescription
Value

The unicodeFormattedText of a field is a string encoded in UTF-16 host byte-order.

RelatedProperty: formattedText, dontWrap
Description

Use the unicodeFormattedText property to convert between unwrapped text (suitable for use in most programs) and wrapped text (suitable for use in programs that require fixed line lengths, such as some email systems).

When you get a field's unicodeFormattedText, the field's text is converted to hard-wrapped text: An end-of-line character is inserted at the end of each screen line, and wherever a return character occurs in the field, two end-of-line characters are substituted. (If the field's dontWrap is true, each screen line ends in an end-of-line character, so two end-of-line characters are substituted for each return character in the field.)

When you set a field's unicodeFormattedText property, the string is unwrapped before being put in the field. Double end-of-line characters are converted to a single end-of-line character, and single end-of-line characters are converted to spaces.

Important: As this property is deprecated, it should not be used in new code; simply get the formattedText as normal. The following are now equivalent:

get the unicodeFormattedText of field 1
get textEncode(the formattedText of field 1, "UTF-16")

Tagstext processing