[fpc-devel] new string - question on usage

Marco van de Voort marcov at stack.nl
Wed Oct 12 09:50:33 CEST 2011


In our previous episode, Hans-Peter Diettrich said:
> > Please explain what you mean by "unicode" and what by "ansi" in your
> > statement. Without nuancing that, your statement is pretty much meaning
> > less.
> 
> AFAIR Delphi changed the string type to Unicode (UTF-16) in D2009, i.e. 
> D2007 was the last Ansi version.

Point I was trying to make is that in D2009+ ansistring includes utf8 which
is also unicode.  Therefore the term "unicode" is ambiguous.  If you mean
the two byte type say utf16 or 2-byte type.
 
> > And keep in mind that while porting Delphi code is an important factor in
> > FPC, but not the only reason.  Many people use FPC for serverside or middle
> > tier development.
> > 
> > It is that why the Delphi model of utf16 strings is not really constructive
> > on *nix.
> 
> I understand that is annoying when the generic string encoding is ever 
> changed into UTF-16. What are the plans with FPC?

Undecided. But I'm very strongly against utf16 default on unix. I don't do
much GUI on unix, and it would be insane to have a string type that is
totally different from all other string types that I touch.



More information about the fpc-devel mailing list