From Xojo Documentation

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

Supported for all project types and targets.

The Mac OS TextEncoding value, useful for Declares.


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.Value)
If t <> Nil Then
Label4.Value = t.Code.ToString
End If