IF fields evaluation encoding?

Hi,

Since Aspose.Words Java cannot perfect the IF fields evaluation yet and
that as far as i understood this feature won’t be available until next
year, I started doing it myself.

I actually wonder what encoding does MS Word use to evaluate the condition.

I mean in an expression like

{IF “abc” = “def” “true” “false”}

what encoding does it use to perform the evaluation?

At first I assumed it it was doing a locale-sentitive String comparison
so I used the Java class Collator set with the language of the system
but it doesn’t seem to work.

For example, when I evaluated

{IF “Saluta” < “Salut b” “true” “false”}
MS Word returns false while the collator comparison true.
thx


I am not experienced with Java but MS Word comparison result seems logical enough to me. After all ASCII code of space character is lesser than ASCII code of 'a'. I think you should try to find a string comparer in Java that shows the same behavior.

well, my problem is that MS Word doesn’t use the ASCII code to compare strings and I have no idea whatsoever of what encoding it uses and couln’t find information about it.
thx anyway

Yes, I have searched for this information too and was not able to find anything. Maybe it is Unicode 16-bit values that they are using for comparison. Or you can try and ask about it on some of Microsoft Word dedicated forums.