On Wednesday 27 November 2013 13:05:29 Mattias Gaertner wrote:
> Hi all,
>
> When using the cwstring widestringmanager the function AnsiCompareText
> seems to have a bug.
>
> For example:
>
> {$mode objfpc}{$H+}
>
> uses
>   Classes, SysUtils, cwstring;
> begin
>   writeln('o   and .   gives ',AnsiCompareText('o','.'));
>   writeln('oc  and .o  gives ',AnsiCompareText('oc','.o'));
>   writeln('oce and .ou gives ',AnsiCompareText('oce','.ou'));
> end.
>
> Result:
>
> o   and .   gives 1
> oc  and .o  gives 1
> oce and .ou gives -18
>
Possibly as intended because the collation of the current locale ignores 
punctuation.

Martin
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to