[fpc-pascal] FCL maskutils incompatible with Delphi
silvioprog
silvioprog at gmail.com
Tue Apr 19 20:05:39 CEST 2016
Hello,
Last week, a member of Lazarus Brazillian group reported a problem related
to the MaskUtils unit. His message (adapted from pt-BR to en-US) was:
*"Good afternoon.*
*I need help with FormatMaskText, because it doesn't work properly with the
same code that works fine on Delphi".*
His refactored example was:
=== code ===
uses maskutils;
const MY_UNMASKED_VALUE = 'H1H357K808K44616YK8720';
begin
WriteLn(FormatMaskText('!>cccccc\-ccccc\-ccccc-cccccc;0;*',
MY_UNMASKED_VALUE));
// uncomment the like below and enjoy the crash
//WriteLn(FormatMaskText('!>CCCCCC\-CCCCC\-CCCCC-CCCCCC;0;_',
MY_UNMASKED_VALUE));
end.
=== /code ===
The expected value: H1H357-K808K-44616-YK8720.
The returned value: H1H357-K808K-44616-******.
If you uncomment the code in the last writeln, it will raise the generic
"FormatMaskText function failed!" error.
However, this attached patch was sent from another member and it seems fix
the problem.
Can I open an issue at bugtracker related to this problem?
Thank you!
--
Silvio Clécio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160419/eeaa5e9c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-maskutils-problem.patch
Type: application/octet-stream
Size: 1586 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160419/eeaa5e9c/attachment.obj>
More information about the fpc-pascal
mailing list