Description of problem: When using the modifier %b in an strptime() pattern, and when using the Finnish locale, (fi_FI or fi_FI.utf8) it fails to recognize all short names except maalis (March). It also fails to recognize the long name marraskuu (November). Version-Release number of selected component (if applicable): glibc-2.5-49.el5_5.7 How reproducible: Every time Steps to Reproduce: 1. Compile the attached test program: cc ca.c -o ca 2. Run it with one or more of the failing months, for example: ./ca 1985.tammi.18 1985.helmi.18 1985.marraskuu.18 Actual results: These are reported as failures. Expected results: They should be coorectly converted to dates. Additional info: I compared with RHEL6 too. In that case, both the short and long version of November (marras and marraskuu) works correctly, but the rest still fails.
Created attachment 462878 [details] Program to use as a test case
Created attachment 462905 [details] Remove trailing whitespaces from abmon fi_FI locale. $ for i in `seq 1 12` ; do LANG=fi_FI.utf8 date -d `printf 2010%02d01 $i` +%b ; done | tee months.fi_FI.utf8 tammi helmi maalis huhti touko kesä heinä elo syys loka marras joulu $ for i in `seq 1 12` ; do LANG=fi_FI date -d `printf 2010%02d01 $i` +%b ; done > months.fi_FI $ while read M ; do LANG=fi_FI.utf8 ./ca 2010.$M.18 ; done < months.fi_FI.utf8 2010.tammi .18 -> 2010-1-18 2010.helmi .18 -> 2010-2-18 2010.maalis.18 -> 2010-3-18 2010.huhti .18 -> 2010-4-18 2010.touko .18 -> 2010-5-18 2010.kesä .18 -> 2010-6-18 2010.heinä .18 -> 2010-7-18 2010.elo .18 -> 2010-8-18 2010.syys .18 -> 2010-9-18 2010.loka .18 -> 2010-10-18 2010.marras.18 FAILED (2010-3-0) 2010.joulu .18 -> 2010-12-18 $ while read M ; do LANG=fi_FI ./ca 2010.$M.18 ; done < months.fi_FI 2010.tammi�.18 -> 2010-1-18 2010.helmi�.18 -> 2010-2-18 2010.maalis.18 -> 2010-3-18 2010.huhti�.18 -> 2010-4-18 2010.touko�.18 -> 2010-5-18 2010.kes䠠.18 -> 2010-6-18 2010.hein��.18 -> 2010-7-18 2010.elo���.18 -> 2010-8-18 2010.syys��.18 -> 2010-9-18 2010.loka��.18 -> 2010-10-18 2010.marras.18 FAILED (2010-3-0) 2010.joulu�.18 -> 2010-12-18 I see two problems: - there are white spaces at the end of all the Finnish short months names except for November; - strptime(3) doesn't behave consistently with date(1) wrt short name for November in Finnish. This first problem seems to be caused by seemingly superfluous <U00A0> characters at the end of most abbreviated months in localedata/locale/fi_FI: 171 abmon "<U0074><U0061><U006D><U006D><U0069><U00A0>";/ 172 "<U0068><U0065><U006C><U006D><U0069><U00A0>";/ 173 "<U006D><U0061><U0061><U006C><U0069><U0073>";/ 174 "<U0068><U0075><U0068><U0074><U0069><U00A0>";/ 175 "<U0074><U006F><U0075><U006B><U006F><U00A0>";/ 176 "<U006B><U0065><U0073><U00E4><U00A0><U00A0>";/ 177 "<U0068><U0065><U0069><U006E><U00E4><U00A0>";/ 178 "<U0065><U006C><U006F><U00A0><U00A0><U00A0>";/ 179 "<U0073><U0079><U0079><U0073><U00A0><U00A0>";/ 180 "<U006C><U006F><U006B><U0061><U00A0><U00A0>";/ 181 "<U006D><U0061><U0072><U0072><U0061><U0073>";/ 182 "<U006A><U006F><U0075><U006C><U0075><U00A0>" http://sourceware.org/git/?p=glibc.git;a=blame;f=localedata/locales/fi_FI As far as I can tell this problem has been present from the first git import. The attached patch fixes this issue. I am not sure about the second problem yet, will open a separate bug if appropriate.
Created attachment 463075 [details] Remove trailing whitespaces from abmon fi_FI locale: RHEL5 patch, for all the months The previous patch was missing a few things and was against git glibc. This one is for RHEL5. Test case without the patch: $ for i in `seq 1 12` ; do LANG=fi_FI.utf8 date -d `printf 2010%02d01 $i` +.%b. ; done .tammi . .helmi . .maalis. .huhti . .touko . .kesä . .heinä . .elo . .syys . .loka . .marras. .joulu . With the patch: $ for i in `seq 1 12` ; do LANG=fi_FI.utf8 date -d `printf 2010%02d01 $i` +.%b. ; done .tammi. .helmi. .maalis. .huhti. .touko. .kesä. .heinä. .elo. .syys. .loka. .marras. .joulu.
This request was evaluated by Red Hat Product Management for inclusion in Red Hat Enterprise Linux 5.7 and Red Hat does not plan to fix this issue the currently developed update. Contact your manager or support representative in case you need to escalate this bug.
Where is this defined?
You mean where the abbreviated month names are defined? They are in the "abmon" section of the file /usr/share/i18n/locales/fi_FI. (According to comment 3 it is in localedata/locale/fi_FI, which I guess is the place in the source. I haven't checked that.)
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux release for currently deployed products. This request is not yet committed for inclusion in a release.
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Same as RHEL 6.3 BZ 657572
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-0022.html