2013/10/24 LacaK <la...@zoznam.sk> > silvioprog wrote / napísal(a): > > Hello, >> >> This morning, I compiled a code using FPC (Windows, rev. 2013/09/01), >> after that, my tests using dataset.locate has stopped. >> >> The Locate method locates record, even when it does not exists. The >> problem occurs only with varchar fields, in integer fields it works fine. >> >> In attachment I'm sending a small project to reproduce it. Here in my >> machine I made two tests, please see the log below: >> >> Result in FPC 2.6.2: >> >> test.exe >> output: N >> output: N >> >> Result in FPC 2.7.1: >> >> test.exe >> output: N >> output: Y >> >> Can you test it in FPC from trunk? >> > I guess, that root of this problem is same like in bug report: > http://bugs.freepascal.org/**view.php?id=25016<http://bugs.freepascal.org/view.php?id=25016> > For sorting/locating are used these string comparasion function: > AnsiCompareText resp. AnsiCompareStr > Can you test directly these functions in any simple string comparation > test ? > I expect, that these functions will return wrong results ? > (may be that string encoding enters into play also? ... ) > -Laco.
In this tests: if AnsiCompareStr('a', 'a') = 0 then WriteLn('Yes') else WriteLn('No'); if AnsiCompareText('a', 'a') = 0 then WriteLn('Yes') else WriteLn('No'); Both returns "Yes". -- Silvio Clécio My public projects - github.com/silvioprog
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal