TextEncoding.Code

From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Read-Only Property (As Integer )
IntegerValue = aTextEncoding.Code

Supported for all project types and targets.

The Mac OS TextEncoding value, useful for Declares.

Notes

You can also use it to compare two encodings: If the Code properties of two TextEncoding objects are equal, then they represent the same text encoding (including base, variation, and format).

Sample Code

This code gets the value of Code for the text in TextArea1.

Var t As TextEncoding
t = Encoding(TextArea1.Text)
If t <> Nil Then
Label4.Text = t.Code.ToString
End If