[fpc-pascal] GetLocaleInfo returns ZZZ

Bart bartjunk64 at gmail.com
Wed Feb 28 13:36:31 CET 2018


On Wed, Feb 28, 2018 at 10:58 AM, Henry Vermaak <henry.vermaak at gmail.com> wrote:
> On Wed, Feb 21, 2018 at 12:11:10PM +0100, Darius Blaszyk wrote:
>> On my machine getlocaleinfo returns ZZZ when requesting the abbrev
>> langname. The country code is correctly set to NL. This makes

My Win 10 machine returns nl_NL as expected.

> The Windows implementation of GetLanguageIDs() in gettext.pp is not
> right.  It uses GetLocaleInfo() with LOCALE_SABBREVLANGNAME and
> LOCALE_SABBREVCTRYNAME where it should probably be using
> LOCALE_SISO639LANGNAME and LOCALE_SISO3166CTRYNAME, respectively.  The
> *_SISO* constants work on Windows 98 and later, maybe that was the
> reason for using *_SABBREV* originally.

Results of GetLocaleInfo with different parameters on my Win10 machine:

LOCALE_SABBREVLANGNAME -> NLD
LOCALE_SABBREVCTRYNAME -> NLD
LOCALE_SISO639LANGNAME -> nl
LOCALE_SISO3166CTRYNAME -> NL
LOCALE_SISO639LANGNAME2 -> nld
LOCALE_SISO3166CTRYNAME2 -> NLD

Bart



More information about the fpc-pascal mailing list