VERIFIED SOLUTION i

Resolve error when comparing two non-printable characters in MapBasic 64-bit

Products affected: MapInfo Pro™ 64-bit, MapBasic® 64-bit

Issue

If you run the following statement within MapBasic® 32-bit / MapInfo Professional® 32-bit you will receive a False outcome:
Mid$(Chr$(1),1,1)=Chr$(2)
Indicating that the characters are not alike.

However, if you run this within MapBasic 64-bit / MapInfo Pro™ 64-bit you will receive a True outcome.
 

Cause

This is a system limitation and is currently working as designed.

Resolution

UPDATED: October 13, 2017
In Unicode MapInfo Pro, the MapBasic equals-operator uses a Unicode normalization and collation scheme for comparing string values. In this scheme, there is no order difference between non-printable characters.

For binary data comparisons, the MapBasic StringCompare function should be used, rather than the equals-operator, as StringCompare performs a byte-comparison, not a normalized string comparison.

For example:
 
StringCompare(Chr$(1), Chr$(2))

will return -1