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

Marcos Douglas md at delfire.net
Wed Dec 18 02:16:34 CET 2013


On Tue, Dec 17, 2013 at 4:15 PM, Jürgen Hestermann
<juergen.hestermann at gmx.de> wrote:
> Am 2013-12-17 02:41, schrieb Marcos Douglas:
>
>> I think use one encoding on all platforms is good, however Windows
>> uses UTF-16. All string from/to Windows needs to be converted, right?
>> Is this not a penalty for Windows platform?
>
> I am just writing a file manager for Windows (hopefully can port it to Linux
> later)
> and I don't see any performance problems by using UTF8 in my program while
> the API is UTF16.
> Most (if not all) things that I do with files take much longer than the
> string conversion so it does not matter much.

Ok. But how do you work, using SysToUTF8 / UTF8ToSys?

> IMO it makes very much sense to use UTF8 (which Linux uses anyway)
> throughout all programs.
> Having multiple string encodings within Lazarus/FPC makes it worse than
> necessary.

It makes perfect sense to use only one encoding, whatever, in all code
of a single program.  ;-)

>
> [...]

Marcos Douglas




More information about the Lazarus mailing list