On Fri, Dec 20, 2013 at 4:22 AM, Juha Manninen <[email protected]> wrote: > On Fri, Dec 20, 2013 at 2:47 AM, Marcos Douglas <[email protected]> wrote: >> Not _only_ to UTF-16? It will depend on the OS? > > No, FPC string will know its encoding and the conversion is made to > any encoding but only when needed. > Let's not go deeper into this subject here. The details of future FPC > are still open and they are not yet documented. > When "Unicode" is mentioned, usually people start to argue about how > it SHOULD be done. > You can search in fpc-pascal and fpc-dev histories for that.
Ok, you're right. >> For now (2.6.2) works ok only for AnsiString... I'm talking about >> codify TStringList class to work with UTF-8 but no changes in string >> type arguments. > > Again no. TStringList in 2.6.2 works ok for UTF-8 encoded strings, too. > The same is true for future FPC versions because they are not > hard-coded for UTF-16 (as Delphi is). I didn't understand. If I have a TStringList instance, on Windows, I need to convert Text property to ANSI. But some components, e.g. TMemo, do these conversions automatically, but this is different. >>> With Delphi you would need to copy the whole class, name it >>> TUtf8StringList, and replace "string" with "UTF8String". >>> This new class must NOT inherit from Classes.TStringList. >> >> The same here... I think. > > No no no :) But you talking about to make a new StringList... this is not the proposal. ;-) Marcos Douglas -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
