TextEncoding.Operator Compare

From Xojo Documentation

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

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.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