TextEncoding.Operator Compare

From Xojo Documentation


TextEncoding.Operator_Compare(otherEncoding as TextEncoding) As Boolean

New in 2008r2

Supported for all project types and targets.

Compares the given encoding to the passed encoding. Currently, only the equals comparison is implemented; relational testing is undefined. As a result, it currently calls the Equals function.


This example compares the encodings of the contents of two TextAreas using Operator_Compare.

Var t1 As TextEncoding
Var t2 As TextEncoding
t1 = Encoding(TextArea1.Value)
t2 = Encoding(TextArea3.Value)
Label1.Value = t1.InternetName
Label2.Value = t2.InternetName
If t1 = t2 Then
TextField1.Value = "Equals"
TextField1.Value = "Not equals"
End If