On Tue, 10 May 2016, Michael Schnell wrote:

On 05/09/2016 09:34 PM, Jonas Maebe wrote:
While still missing in the documentation, you can already do that with {$modeswitch unicodestrings}.

If this avoids the issues, Graeme found, why is this not enabled as default, as well in the user code as in the RTL interface ?

Several reasons:

1. Backwards compatibility. 2. We'd need to check all code. Much of the code assumes char = 1 byte.
   That includes all other code besides RTL: Database code, web code etc.
3. It increases memory use.
   All of a sudden, all your programs will use lots more memory.
   Maybe not important on a server, but it is e.g. in embedded.
4. For Delphi, the choice was clear: Windows is using UTF16, so all APIs are
   better off using UT16. Under unix-like OSes, UTF8 is a better choice
   IMHO.

There is no simple answer...

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to