Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2017-07

TStringStream changes

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Van Canneyt

Hello,

TStringStream now observes encoding, following the fix for:

https://bugs.freepascal.org/view.php?id=30508

Basically, this is a Delphi compatibility fix.

This may impact some programs which use encodings that deviate from the default system encoding.

In that case, the solution is to cast your string to RawByteString in the constructor, or explicitly specify an encoding.

If you want to avoid encoding problems, using a TBytesStream may be a better idea.

Michael.

Reply by email

Ondrej Pokorny
to Michael Van Canneyt
Michael Van Canneyt wrote
TStringStream now observes encoding.

Are these changes going to be merged to fixes_3_0? What first stable version it is going to appear in?

As it turned out, Lazarus sources are affected by this change too, so we need to get the correct {$IF FPC_FULLVERSION >= 30x0x}.

Thanks
Ondrej

Reply by email