[Lazarus] String vs WideString
Michael Van Canneyt
michael at freepascal.org
Tue Aug 15 11:52:49 CEST 2017
On Tue, 15 Aug 2017, Michael Schnell via Lazarus wrote:
> On 15.08.2017 11:25, Michael Van Canneyt via Lazarus wrote:
>> WideString/UnicodeString for those that want 2-byte characters.
>> A codepage-aware single-byte string for those that want 1-byte
>> characters.
>> The shortstring is even still available.
>
> IM (often stated) O, this does not help as long as TStrings does not
> without forced auto-conversion support the string type the user is
> inclined to choose.
Please check TStrings in trunk. This exists.
procedure LoadFromFile(const FileName: string; AEncoding: TEncoding); overload; virtual;
procedure LoadFromStream(Stream: TStream; AEncoding: TEncoding); overload; virtual;
The only 'problem' is that TStrings uses a single-byte string.
This cannot be solved properly except by duplicating the classes unit.
Michael.
More information about the Lazarus
mailing list