The documentation for the GetÂUserÂDefaultÂGeoÂName
function says
Retrieves the two-letter International Organization for Standardizationo(ISO) 3166-1 code or numeric United Nations (UN) Series M, Number 49 (M.49) code for the default geographical location of the user.
There is no description about how the system chooses between them, so it sounds like the system internally flips a coin and picks one, so the code needs to be prepared for anything!
What happens is that the GetÂUserÂDefaultÂGeoÂName
function returns the two-letter ISO 3166-1 code if one has been assigned. If the assigned code is XX, the convention used by WIPO for regions with no assigned code, then the function uses the UN M.49 code if one is available. If neither is available, then the function shrugs and uses XX after all.
I’ve submitted an update to the documentation to make this a bit clearer.
¹ There’s an edge case where the system doesn’t know what region the user is in. In that case, you get UN M.49 code 001, which means “Somewhere in the world.”
0 comments
Be the first to start the discussion.