Page 1 of 1

EndsWith bugs with non-casesensitive comparison if it's not done in UTF8

Posted: Tue Oct 17, 2023 4:31 pm
by jPV
If you try to compare non-UTF8 data without case sensitivity with EndsWith(), the result is False always.

Code: Select all

ConsolePrint(EndsWith("testbla", "bla", True, #ENCODING_RAW))   ; prints 1
ConsolePrint(EndsWith("testbla", "bla", False, #ENCODING_RAW))  ; prints 0
ConsolePrint(EndsWith("testbla", "bla", True, #ENCODING_UTF8))  ; prints 1
ConsolePrint(EndsWith("testbla", "bla", False, #ENCODING_UTF8)) ; prints 1

Re: EndsWith bugs with non-casesensitive comparison if it's not done in UTF8

Posted: Sat Oct 21, 2023 9:53 pm
by airsoftsoftwair
Clearly a bug. Will be fixed, thanks for reporting!

Re: EndsWith bugs with non-casesensitive comparison if it's not done in UTF8

Posted: Sat Jul 20, 2024 4:24 pm
by airsoftsoftwair

Code: Select all

- Fix: Case insensitive mode didn't work correctly in EndsWith() when not using UTF-8 encoding