Open benibela opened 3 years ago
I forgot the [rfUTF8] flag
But the first three still fail with it:
f := TFLRE.Create('k', [rfIGNORECASE,rfUTF8]);
writeln(f.Find('K'));
f := TFLRE.Create('K', [rfIGNORECASE,rfUTF8]);
writeln(f.Find('K'));
f := TFLRE.Create('[a-z]', [rfIGNORECASE,rfUTF8]);
writeln(f.Find('K'));
f := TFLRE.Create('K', [rfIGNORECASE,rfUTF8]);
writeln(f.Find('k'));
Also rfIGNORECASE is a bad name, since it collides with sysutils.rfIGNORECASE
Perhaps UTF8Find needs to be used?
f := TFLRE.Create('k', [rfIGNORECASE,rfUTF8]);
writeln(f.UTF8Find('K'));
f := TFLRE.Create('K', [rfIGNORECASE,rfUTF8]);
writeln(f.UTF8Find('K'));
f := TFLRE.Create('[a-z]', [rfIGNORECASE,rfUTF8]);
writeln(f.UTF8Find('K'));
f := TFLRE.Create('K', [rfIGNORECASE,rfUTF8]);
writeln(f.UTF8Find('k'));
But that gives the same output
Unicode has special lower/upper case rules for certain symbols, besides ASCII cases.
For example, these should all find a match (Unicode Kelvin sign 8490 ):