[fpc-devel] Unicode support - for the 20th time... ;-)
florian at freepascal.org
Thu Nov 20 10:12:34 CET 2008
Graeme Geldenhuys schrieb:
> Hello again,
> We are seeing more and more "hacks" being applied to projects trying
> to scramble around the missing FPC feature - no built-in Unicode
> A simple example in Lazarus.... Loading a UTF-8 encoded file into a TMemo.
> Normally you would write code as follows (for ANSI text):
> Unfortunately that doesn't work if the file contains unicode content,
> so the following "hack" is required which is quite nasty:
> ls := TStringList.Create;
> for i := 0 to ls.Count-1 do
> ls[i] := UTF8Encode(ls[i]);
> I'm also pretty sure I am not the only one that is willing to help
> with this feature - many developers require Unicode support. And this
> is just going to become more urgent as time goes by. So lets finalize
> a design and start implementation. Pretty please. ;-)
Ok, two questions for the example above:
- how do you maintain backward compatibility?
- how do you load a plain old ansi file?
More information about the fpc-devel