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.

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