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

Report any Hollywood bugs here
Post Reply
User avatar
jPV
Posts: 674
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

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

Post 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
User avatar
airsoftsoftwair
Posts: 5615
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

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

Post by airsoftsoftwair »

Clearly a bug. Will be fixed, thanks for reporting!
User avatar
airsoftsoftwair
Posts: 5615
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

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

Post by airsoftsoftwair »

Code: Select all

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