Sven Barth schrieb:

http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/rtl/inc/astrings.inc?revision=19444&view=markup

I don't understand the use of encoding 0 and CP_NONE in FPC. Can somebody explain?

Furthermore I suspect that the implementation of

Function Pos(Const Substr : RawByteString; Const Source : RawByteString) : SizeInt;

is wrong. The comparison must take into account the encodings of both strings.


Function Pos(c : AnsiChar; Const s : RawByteString) : SizeInt;
is questionable at all, when the encoding of the arguments is unknown or ignored (as is).


I have the bad impression that the implementors didn't understand the purpose and correct use of RawByteString, or try to implement something incompatible with Delphi :-(

DoDi

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

Reply via email to