[RFC] Automatically set GeoID on process startup

João Diogo Ferreira devilj at outlook.pt
Thu Oct 17 20:54:15 CDT 2019


> How about returning something like
> GetLocaleInfo(GetUserDefaultLCID(), LOCALE_ICOUNTRY|LOCALE_RETURN_NUMBER)?

LOCALE_ICOUNTRY is the phone prefix, but your idea is sound.
I tried LOCALE_IGEOID too but couldn't figure out how to implement in Wine.
(Hint: simply adding those to the .nls files was not enough.)

What I found works is asking for the country code (LOCALE_SISO3166CTRYNAME)
(what a mouthful) and matching it to the GeoID (easy).

Working with letter codes is actually better, too, because Microsoft is moving
away from GeoIDs and into "geonames" (two-letter codes, like Linux and Android)
and we can just do the matching in the new procs that support geonames.
In fact, that's exactly what Microsoft is doing! Useful behavior to replicate.

Now, what I really, really need to know is how to let anybody opt-out,
because not every country has a locale in Linux (or Wine, for that matter) x.x

(sorry for sending you this message before without CC'ing the mailing list, and for having to send it again)
________________________________
De: Dmitry Timoshkov <dmitry.timoshkov at gmail.com> em nome de Dmitry Timoshkov <dmitry at baikal.ru>
Enviado: 14 de outubro de 2019 05:51
Para: João Diogo Ferreira <devilj at outlook.pt>
Cc: wine-devel at winehq.org <wine-devel at winehq.org>
Assunto: Re: [RFC] Automatically set GeoID on process startup

João Diogo Ferreira <devilj at outlook.pt> wrote:

> ... basically like we already do for locale.
>
> Hello all. So for my first contribution to Wine I've been wanting to
> tackle this issue, reported and suggested in bug #46196. I'd like to hear
> everyone's opinions on it and also have one question answered.
>
> The bug: https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugs.winehq.org%2Fshow_bug.cgi%3Fid%3D46196&data=02%7C01%7C%7C34225219423b4e88a13808d750623880%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637066255086758126&sdata=0RAB%2BGEY1JSGpkH1jsErkTnxbidWfVd9y7KU8259mkg%3D&reserved=0

How about returning something like
GetLocaleInfo(GetUserDefaultLCID(), LOCALE_ICOUNTRY|LOCALE_RETURN_NUMBER)?

--
Dmitry.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20191018/7386d142/attachment.htm>


More information about the wine-devel mailing list