[fpc-devel] Explanation about code page-aware AnsiStrings
DrDiettrich1 at aol.com
Wed Jan 8 19:57:48 CET 2014
Sven Barth schrieb:
> Am 08.01.2014 15:58 schrieb "Hans-Peter Diettrich" <DrDiettrich1 at aol.com
> <mailto:DrDiettrich1 at aol.com>>:
> > Delphi concatenates RawByteStrings to the dynamic encoding of the
> *first* string, the appended strings eventually are converted before
> concatenation. Special handling of strings with the same encoding is not
> > I.e. the result is *not* always a CP_ACP string, as documented in the
> Would you be so kind to provide a simple test case for this? :)
function test(a,b: RawByteString): RawByteString;
Result := a+b;
a := 'äöü';
u := 'üöä';
It looks to me, however, that no conversion occurs at all!
The strings are only concatenated as they are.
Same for a concatenation of (global) RawByteString variables.
This of course were not a desireable implementation :-(
More information about the fpc-devel