This is the mail archive of the libc-locales@sourceware.org mailing list for the GNU libc locales project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: LC_TIME missing keywords


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]