[fpc-devel] new string - question on usage

Hans-Peter Diettrich DrDiettrich1 at aol.com
Tue Oct 11 23:09:32 CEST 2011


Marco van de Voort schrieb:

> Note that many places that are runtime typed (like tstringlist.loadfromfile)
> get a encoding parameter, so that the loading code can convert the encoding
> of the file (in encoding parameter) to whatever stringtype tstringlist uses
> (typically utf8 or utf16 or "default")

Do you refer to the Delphi or FPC implementation? I couldn't find yet an 
encoding in FPC TStrings or TStringList.


> In short, see it as if text now has a mandatory encoding attached. If the
> runtime doesn't know the type, then it is not text, but binary, and you
> should treat it as such.

Can you give an example, how the runtime can not know the type of an string?

DoDi




More information about the fpc-devel mailing list