Page 1 of 1

CompareStr() and binary data

Posted: Mon May 13, 2024 11:18 am
by Flinx
Hello,
I'm not sure if I am allowed to call this a bug, but when I use CompareStr() with #ENCODING_RAW, I was hoping it would do a binary data comparison, but the strings are zero-terminated.
If this is intentional, I would mention it in the manual.

Code: Select all

DebugPrint(CompareStr("Exif\0\2","Exif\0\0", True, #ENCODING_RAW))

Re: CompareStr() and binary data

Posted: Mon May 20, 2024 6:06 pm
by airsoftsoftwair
I think this is intentional. As mentioned here #ENCODING_RAW is just a synonym for #ENCODING_ISO8859_1 (both constants have the same value 0) so there is no way to make #ENCODING_RAW behave different than #ENCODING_ISO8859_1.