<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">On Thu, Feb 25, 2021 at 12:44 PM José Mejuto via lazarus <<a href="mailto:lazarus@lists.lazarus-ide.org">lazarus@lists.lazarus-ide.org</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Backwards compatibility, in special the escape character which can be <br>
used in old masks like: "C:\*.*". The other functions can be kept <br>
active, but escape char could be a compatibility problem.<br></blockquote><div><br></div><div>Ok, true.</div><div>Escaping special characters would be very handy. A pity.</div><div>I kept the name TMaskUTF8 after all and inherited TMask from it. It helps synchronise changes between our versions, among other things.</div><div>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.</div><div>I will look at the case-insensitive match of Unicode next...</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Anyway, revisiting code I've found a bug in the escape character in char <br>
groups, which simply are ignored. It has been fixed in UTF8 version, I'm <br>
now porting to UTF16 and Ansi and I'll send you the updated version. <br>
Also fixed the "[!]" mask to raise an exception and the <br>
"RANGES_AUTOREVERSE" (was a variable rename from "cMask" to "lMask" <br>
which was missed in the IFDEF).<br></blockquote><div><br></div><div>I renamed "cMask" to "lMask" here. Earlier I made other changes.</div><div>I renamed UTF8Length to UTF8CodepointSizeFast. LazUTF8 has that function for the purpose (and UTF8CodepointSize). Then I used the LazUTF8 version.</div><div>UTF8Length in LazUTF8 means the number of codepoints in a whole string.<br></div><div>I also changed PByte to PChar because of that function change. It seems to compile everywhere.</div><div>An exception from "[!]" mask would be good, yes. It is clearly an error from a user. The current TMask also complains about it.<br></div><div><br></div><div>Juha</div><div><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>