Is it possible that REALConvertString is broken ?

RBInteger result;
REALstring newString = REALConvertString(text, someEncoding); // Tested a lot of encodings here

result = REALCompareStrings(newString, text);
REALUnlockString(newString);

if(result == 0);
{
NSLog(@“Strings are still compatible”);
return;
}

Same in Xojo code

Dim a as String = “a er n a”
Dim b as String

b = a.ConvertEncoding(Encodings.MacRoman)

if b = a then
MsgBox “Strings are still compatible”
end if

Same text was sent to the plugin code

The Xojo code will hardly ever say their still compatible while the plugin code will always say their still compatible.

So…is the REALConvertString possibly broken ?

Ok so I am almost certain that the REALConvertString is doing its job, but that would only mean that REALCompareStrings is not doing it.

It looks like its not doing same as the built in = operator or the StrComp function

Instead it seems to take the string of the higher encoding and convert it to the lower and then blatantly say the strings are equal.

So why is it not the same as the built in = operator or the same as StrComp function ?

Never mind there is a extra ; there that is distorting my test.