[Lazarus] unit Masks vs. unit FPMasks
joshyfun at gmail.com
Thu Feb 25 11:44:29 CET 2021
El 25/02/2021 a las 10:39, Juha Manninen via lazarus escribió:
> UTF8 is also Unicode, one of its encodings.
> The name UnicodeString is misleading. It should be UTF16String.
> Please remember our Unicode solution uses UTF-8. It is done by changing
> the default encoding of AnsiString and triggered by the same LazUTF8
> unit that is used by Masks unit. Everything is UTF-8.
Yes, Unicode is a very, very bad name. I've developed the code with fpc
in mind, not Lazarus, that's the reason of the three versions. From the
point of view of Lazarus, UTF8 is enough.
> This way current code using TMask will behave 99.9% identical, but an
> user that needs to mask other strings can use TMaskUnicode, in example,
> and activate or deactivate other extensions.
> Where do the other strings come from? Anyway TMaskUnicode can be
> included, no problem.
> I am not sure we want a new TMask to behave 99.9% identical with the
> current one. The new one has some clear improvements.
> Interestingly there does not seem to be any standard for the mask
> syntax. So we cannot be compliant to any "standard".
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.
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).
Have a nice day.
More information about the lazarus