[Lazarus] In NeedRTLAnsi, can GetACP return CP_UTF8 on Windows?

cobines cobines at gmail.com
Wed Nov 9 20:04:27 CET 2011

2011/11/8 Felipe Monteiro de Carvalho <felipemonteiro.carvalho at gmail.com>:
> On Tue, Nov 8, 2011 at 9:50 PM, cobines <cobines at gmail.com> wrote:
>> FNeedRTLAnsi:=GetACP<>CP_UTF8;
> This is used by FileUtil in Windows for Windows 9x support
>> Is it possible that CP_UTF8 will ever be returned by GetACP?
> I've never heard of a Windows localization where this occurs.
>> I know that CP_UTF8 exists on the list of codepages but I suspect it
>> has only been added for use in functions like MultiByteToWideChar,
>> SetConsoleOutputCP.
> This is my understanding too.

So can the implementation of NeedRTLAnsi on Windows be changed to
return always True? Or is it needed to read the variable because it
can be set by SetNeedRTLAnsi. Or at least GetACP<>CP_UTF8 might be
exchanged to True.


More information about the Lazarus mailing list