/*
Subtle difference. v19 actually has the bug here. v19 supports matching
partial Utf-8 characters (1st byte only ) and v20 does not.
I think you meant to do an SBCS/DBCS search. The Regex Evaluator and
the edit window (I assume you're on Windows) are doing a SBCS/DBCS search
which is why they work.
By default, all Slick-C compiled strings literals are Utf-8. It's been
this way for a very long time.
Since on some platforms (Windows), Slick-C files default to SBCS/DBCS and
others like Mac and Ubuntu it defaults Utf-8, it's a bad idea to use literal characters
above 127 in a string.
*/
int i;
// You probably meant to do this. Use the A option for this.
i=pos('[\x80-\xFF]',"This is an \xc5 in position 11.",1,"ALI");
say('i='i);
// This searches a bunch of bytes and can match a byte anywhere in a
// Utf-8 or DBCS character. Use binary Y option.
i=pos('[\x80-\xFF]',"This is an \xc5 in position 11.",1,"YLI");
say('i='i);