Bug 169770 - glibc no longer gives correct locale info.
Summary: glibc no longer gives correct locale info.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-10-03 14:18 UTC by Pierre Ossman
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2005-10-03 15:32:05 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Pierre Ossman 2005-10-03 14:18:35 UTC
Description of problem:
glibc no longer gives a correct answer to some locale calls.

Test program:

#include <langinfo.h>
#include <stdio.h>

int main(int argc, char** argv)
{
        printf("First weekday: %d\n", (int)nl_langinfo(_NL_TIME_FIRST_WEEKDAY)[0]);
        printf("Week first day: %d\n", nl_langinfo(_NL_TIME_WEEK_1STDAY));

        return 0;
}

Output:

[drzeus@poseidon]$ LC_TIME=sv_SE ./langtest
First weekday: 7
Week first day: 19971130

Expected:
[drzeus@poseidon]$ grep weekday /usr/share/i18n/locales/sv_SE
first_weekday 2

Version-Release number of selected component (if applicable):
glibc-2.3.90-12
glibc-common-2.3.90-12


This bug is causing problems here since it throws off calculation of week
numbers in every application.

Comment 1 Pierre Ossman 2005-10-03 15:32:05 UTC
False alarm. My code misses a setlocale(LC_ALL, ""); so it will of course not work.

The problem must be in GTK+ since it is gtk-based programs that are misbehaving
(calander widget most notably). I'll continue digging. Sorry for the noise.


Note You need to log in before you can comment on or make changes to this bug.