Version 1.2 of ai05s/ai05-0233-1.txt
!standard A.19(8/3) 10-11-22 AI05-0233-1/01
!reference AI05-0127-2
!class Amendment 10-10-25
!status Amendment 2012 10-11-22
!status ARG Approved 6-0-4 10-10-30
!status work item 10-10-25
!status received 10-09-01
!priority Low
!difficulty Easy
!subject Questions on Locales
!summary
(1) If multiple locales are available on a target, which locale is returned is
unspecified.
(2) The active locale is the one associated with the partition of the current
task.
!problem
(1) Which 'locale' should be returned from the functions in package Ada.Locales?
For instance, on Windows (XP, 2000, possibly others) there are at least a 'default
system locale' and the 'current users locale'.
(2) Why is Ada.Locales preelaborated? There can be no warranty that all instances
of this package in different partitions returns the same value because of
possible different settings.
!proposal
(See summary.)
!wording
Modify A.19(8/3):
The active locale is the locale associated with the [active] partition {of the
current task}.
Add an AARM Implementation Note:
Some environments define both a system locale and the locale of the current user.
For such environments, the active locale is that of current user if any;
otherwise (as in a partition running on a server without a user), the system
locale should be used.
!discussion
Systems that distinguish between the current user locale and
the system locale may also provide means to determine which locale is
more appropriate for an executing program. For instance, on Microsoft Windows,
GetThreadLocale will return the most appropriate locale for the current thread;
the result of that routine can be used in GetLocaleInfo to determine the results
to return from calls to Language and Country.
Ada.Locales is preelaborated in order to maximize flexibity for client usage.
However, a preelaborated package is not restricted to return the same value for
all partitions for a given function. Subsequent calls to the same preelaborated
function may in fact return different values even if the calls are made from
within the same partition. This applies to locales as well; if the locale is
changed by some means (perhaps by using an appropriate OS-specific API), the
results of Language and Country may change for a running partition.
!corrigendum A.19(0)
Insert new clause:
Force a conflict; the real text is found in the conflict file.
A locale identifies a geopolitical place or region and its associated
language, which can be used to determine other internationalization
related characteristics.
!ACATS test
No additional ACATS test is needed here.
!ASIS
No impact on ASIS.
!appendix
From: Martin Dowie
Sent: Wednesday, September 1, 2010 4:26 AM
Which 'locale' should be returned from the functions in package Ada.Locales?
For instance, on Windows (XP, 2000, possibly others) there are at least a
'defaulot system locale' and the 'current users locale' and possibly others
that I don't know about.
****************************************************************
From: Vadim Godunko
Sent: Wednesday, September 1, 2010 3:10 PM
Why Ada.Locales package is preelaborate? There are no warranty that all instances
of this package in different partitions returns the same value because of possible
different settings.
****************************************************************
Questions? Ask the ACAA Technical Agent