[fpc-devel] Performance of string handling in trunk

Hans-Peter Diettrich DrDiettrich1 at aol.com
Wed Jun 26 18:19:38 CEST 2013


Michael Schnell schrieb:
> 
> On 06/26/2013 02:59 PM, Sven Barth wrote:
>> ... And using SetCodePage you can force a conversion.
> 
> The docs say:
> 
> ===============================================================================
>  procedure SetCodePage(var S: RawByteString; CodePage: Word; Convert:
> Boolean);
> 
> Mit der Routine *SetCodePage* setzen Sie die Codeseite für eine 
> RawByteString 
> <http://docwiki.embarcadero.com/Libraries/XE2/de/System.RawByteString>-Typvariable.
> 
> 
> ===============================================================================
> 
> 
> This also is compatible with my suggestion:
> 
> If the RawByteString Variable already has a dynamic encoding type
> other than $FFFF a conversion might or might not be necessary.

A string variable has no encoding type stored. Only non-empty strings 
have an encoding.

No string can have an encoding of $FFFF.

DoDi




More information about the fpc-devel mailing list