[fpc-devel] Unicode support - for the 20th time... ;-)

listmember listmember at letterboxes.org
Thu Nov 20 12:49:44 CET 2008


> Ok, two questions for the example above:
> - how do you maintain backward compatibility?
> - how do you load a plain old ansi file?

You could alter the LoadFromFile(), LoadFromStream(), SaveToFile(), 
SaveToStrwam() routines like below:

procedure TStringList.LoadFromFile(AFileName: TFilename; const ACharSet: 
TCharSetKind = csSomeDefaultCharset);

This way, code using these would compile and work as usual.

Of course, descendants would need to be modified --a one time modification.



More information about the fpc-devel mailing list