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

I tested on Linux 64bit with fpc 2.6.2 and 2.7.1 (rev 25875).

See bug report
http://bugs.freepascal.org/view.php?id=25378

What is the state of the cwstring manager?

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

Reply via email to