public inbox for libc-locales@sourceware.org
 help / color / mirror / Atom feed
* LC_TIME missing keywords
@ 2013-09-13 19:56 Steven Abner
  2013-09-13 20:07 ` Carlos O'Donell
  0 siblings, 1 reply; 3+ messages in thread
From: Steven Abner @ 2013-09-13 19:56 UTC (permalink / raw)
  To: libc-locales

Hello list,
 Hope this is the correct list, bug-glibc-locales@gnu.org listed in locale files bounced.
 I was working on a parser for my source code and found three locales that lack POSIX "mandatory" keywords.
Almost all lack "era*", which is OK, but the ones I question are the three that lacked "t_fmt_ampm" keyword. 
Two locales have "am_pm" defined as a non-nul string values. Locale "km_KH" has "t_fmt_ampm" commented out.
Locale "ff_SN" has "t_fmt_ampm" missing. For these two should I uncomment the one and provide a non-nul string
for the other? The third "ug_CN" has nul strings for "am_pm" and missing "t_fmt_ampm". That one I assume just provide a
nul string, but your files, I just started locales, you tell me please.
 That question above leads to two other questions. Some locales have a "am_pm" defined but a "t_fmt_ampm" defined
as does not use 12 hour format (nul string), what should be done in this case as far as strf/ptime()? Conversely, when
one uses a 12 hour format ("t_fmt_ampm" keyword, %p specifically) should the "am_pm" be defined as a non-nul string?
Examples:  af_ZA, ff_SN, zh_SG; br_FR, bg_BG, cs_CZ.
 Those questions lead to this: could you email POSIX and request that %k, %l be added to the appropriate time interfaces?
I, as a peon, don't carry any weight and had complications just getting typos changed. And was unaware of their
existence until working with these locale files.
I am using glibc-2.18 data, IEEE Std 1003.1, 2013 Edition.
 Thanks in advance,
Steve
pheonix@zoomtown.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: LC_TIME missing keywords
  2013-09-13 19:56 LC_TIME missing keywords Steven Abner
@ 2013-09-13 20:07 ` Carlos O'Donell
  2013-09-13 21:56   ` Steven Abner
  0 siblings, 1 reply; 3+ messages in thread
From: Carlos O'Donell @ 2013-09-13 20:07 UTC (permalink / raw)
  To: Steven Abner; +Cc: libc-locales

On 09/13/2013 03:28 PM, Steven Abner wrote:
> Hello list,
>  Hope this is the correct list, bug-glibc-locales@gnu.org listed in locale files bounced.

This is the right list, sorry the other one bounced,
we should look into that.

>  I was working on a parser for my source code and found three locales that lack POSIX "mandatory" keywords.
> Almost all lack "era*", which is OK, but the ones I question are the three that lacked "t_fmt_ampm" keyword. 
> Two locales have "am_pm" defined as a non-nul string values. Locale "km_KH" has "t_fmt_ampm" commented out.
> Locale "ff_SN" has "t_fmt_ampm" missing. For these two should I uncomment the one and provide a non-nul string
> for the other? The third "ug_CN" has nul strings for "am_pm" and missing "t_fmt_ampm". That one I assume just provide a
> nul string, but your files, I just started locales, you tell me please.
>  That question above leads to two other questions. Some locales have a "am_pm" defined but a "t_fmt_ampm" defined
> as does not use 12 hour format (nul string), what should be done in this case as far as strf/ptime()? Conversely, when
> one uses a 12 hour format ("t_fmt_ampm" keyword, %p specifically) should the "am_pm" be defined as a non-nul string?
> Examples:  af_ZA, ff_SN, zh_SG; br_FR, bg_BG, cs_CZ.
>  Those questions lead to this: could you email POSIX and request that %k, %l be added to the appropriate time interfaces?
> I, as a peon, don't carry any weight and had complications just getting typos changed. And was unaware of their
> existence until working with these locale files.
> I am using glibc-2.18 data, IEEE Std 1003.1, 2013 Edition.

I have no idea what to say about the bugs you report,
only that we need a detailed example with code which
shows the problem and you should probably file a bug
in bugzilla so we can track this.

Once we fix glibc we can then talk about going to
POSIX to talk about supported formats, which I doubt
will change without seriously well formed rationale
for the need to change.

Cheers,
Carlos.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: LC_TIME missing keywords
  2013-09-13 20:07 ` Carlos O'Donell
@ 2013-09-13 21:56   ` Steven Abner
  0 siblings, 0 replies; 3+ messages in thread
From: Steven Abner @ 2013-09-13 21:56 UTC (permalink / raw)
  To: Carlos O'Donell; +Cc: libc-locales


On 13 Sep 2013, at 4:06 PM, Carlos O'Donell wrote:

> we need a detailed example with code which
> shows the problem

Not sure how to show missing keyword? other than providing my parser code, not a small file!
The file "km_KH" has this inside of it:
  am_pm    "<U1796><U17D2><U179A><U17B9><U1780>";"<U179B><U17D2><U1784><U17B6><U1785>"
  % Appropriate 12-hour clock representation  "%I:%M:%S %p"
  %t_fmt_ampm  "%I<U003A>%M<U003A>%S<U0020>%p"
The file "ff_SN" has this, can't show "t_fmt_ampm" since missing:
  am_pm    "<U0073><U0075><U0062><U0061><U006B><U0061>";/
	 "<U006B><U0069><U006B><U0069><U0069><U0257><U0065>"
The file "ug_CN" has this, can't show "t_fmt_ampm" since missing:
  am_pm    "";""

From examples listed before, a print out, rather than file <Uxxxx> file wording:
where has "am_pm" yet no "t_fmt_ampm", or nul string in file:
  zh_SG.UTF-8
  "上午", "下午",
  "",

where has no "am_pm" yet  "t_fmt_ampm" (using undocumented %l):
  bg_BG.UTF-8
  "", "",
  "%l,%M,%S",
where a %l requests a 12-hour format, yet has no differentiation between 1 and 1, likely leading
to a return of 1 am in strptime() or strftime() with "%r %p" will print "4, 0, 0 " for a tm_hour = 16 and
tm_hour = 4.

where has "<space>" yet "t_fmt_ampm", (using %p):
  br_FR.ISO-8859-1
  " ", " ",
  "%Ie%M:%S %p",

where has no  "am_pm" yet "t_fmt_ampm", (using %p):
  ms_MY.UTF-8
  "", "",
  "%I:%M:%S %p %Z",

a %k example (nul string valid, 24hr clock, undocumented %k):
  ar_SA.ISO-8859-6
  "", "",
  "%k:%M:%S",

Hopefully this a detailed example?
And maybe the question (not implied but responded as a bug) is:
If these, which seem to be for years, are acceptable, what does glibc do to handle
these cases so that I might do the same? Though the "km_KH" might be a case of missing
<newline> after the <%>?

Steve
pheonix@zoomtown.com


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-09-13 21:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-13 19:56 LC_TIME missing keywords Steven Abner
2013-09-13 20:07 ` Carlos O'Donell
2013-09-13 21:56   ` Steven Abner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).