On Thu, Feb 25, 2021 at 12:44 PM José Mejuto via lazarus < lazarus@lists.lazarus-ide.org> wrote:
> Backwards compatibility, in special the escape character which can be > used in old masks like: "C:\*.*". The other functions can be kept > active, but escape char could be a compatibility problem. > Ok, true. Escaping special characters would be very handy. A pity. I kept the name TMaskUTF8 after all and inherited TMask from it. It helps synchronise changes between our versions, among other things. Now I need instructions or a piece of code into TMask constructor to make it ~ backwards compatible. Later we can see if the advanced features can be used. I will look at the case-insensitive match of Unicode next... Anyway, revisiting code I've found a bug in the escape character in char > groups, which simply are ignored. It has been fixed in UTF8 version, I'm > now porting to UTF16 and Ansi and I'll send you the updated version. > Also fixed the "[!]" mask to raise an exception and the > "RANGES_AUTOREVERSE" (was a variable rename from "cMask" to "lMask" > which was missed in the IFDEF). > I renamed "cMask" to "lMask" here. Earlier I made other changes. I renamed UTF8Length to UTF8CodepointSizeFast. LazUTF8 has that function for the purpose (and UTF8CodepointSize). Then I used the LazUTF8 version. UTF8Length in LazUTF8 means the number of codepoints in a whole string. I also changed PByte to PChar because of that function change. It seems to compile everywhere. An exception from "[!]" mask would be good, yes. It is clearly an error from a user. The current TMask also complains about it. Juha
-- _______________________________________________ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus