[Lazarus] Lazarus (UTF8) and Windows: SysToUTF8, UTF8ToSys... Is there a better solution?

Hans-Peter Diettrich DrDiettrich1 at aol.com
Wed Dec 25 01:36:43 CET 2013


Jürgen Hestermann schrieb:

> The ANSI interface should not be used anymore. It is obsolete and only 
> needed
> for ancient OS's like DOS. But programmers should not be encourraged to 
> use it
> on modern platforms. Just use UTF8 *everywhere*. That should be the aim 
> IMO.

Whenever the encoding matters, most users and applications are best off 
with their regional Ansi encoding - all used characters are single 
bytes. UTF-16 extends the range of languages whose characters can be 
assumed to have a fixed size, i.e. all character sets in the BMP. Such 
fixed-size characters IMO are on the top of the wishlist of most users, 
so that none of them ever will be happy with UTF-8. Certainly UTF-8 was 
the best choice when Delphi (and FPC) did not have native UTF-16 
strings, but when we have Unicode strings, now or soon, it should be 
dropped.

DoDi





More information about the Lazarus mailing list