[Lazarus] Garbage writing to console

Michael Van Canneyt michael at freepascal.org
Fri Feb 23 10:25:59 CET 2018



On Fri, 23 Feb 2018, R0b0t1 via Lazarus wrote:

> On Fri, Feb 23, 2018 at 2:29 AM, Ondrej Pokorny via Lazarus
> <lazarus at lists.lazarus-ide.org> wrote:
>> OK, you mean it's a wiki page issue. I just didn't understand how we could
>> solve it in Lazarus :)
>>
>
> I am interested in this thread because I was under the impression that
> UTF-8 support in Windows is fundamentally broken and should not be
> used (it interferes with the C libraries).
>
> Not to take the thread offtopic, but can anyone comment on this in practice?

Where did you get that from ?

You can perfectly use UTF8 in FPC code, but when calling a windows API, you
should 
a) convert UTF8 to UTF16 (or WideString). If you use the correct types,
    the compiler will do it for you most of the time.
b) Use the *W variant of a Windows system call.


Michael.


More information about the Lazarus mailing list