Bug#327025: C locale has bad default for _NL_TIME_FIRST_WEEKDAY

2005-09-08 Thread Denis Barbier
On Wed, Sep 07, 2005 at 05:40:56PM -0500, Graham Wilson wrote:
 I filed it against the locales package first since I assumed the fix was
 in the file /usr/share/i18n/locales/POSIX, which is in the locales
 package.

This has to be fixed even when no locales are compiled, so locale data
files can not help here.

 Reassigning to libc6 sounds fine, but are you sure the bug is in the
 locale and localedef programs? Isn't it in the library source itself?

Right, the patched file locale/C-time.c is also built into the library,
so this oneliner fix everything.

Denis


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#327025: C locale has bad default for _NL_TIME_FIRST_WEEKDAY

2005-09-07 Thread Graham Wilson
Package: locales
Version: 2.3.5-6
Severity: normal

The _NL_TIME_FIRST_WEEKDAY symbol, when passed to nl_langinfo, is
supposed to give the first day of the week. This seems to work
correctly for most locales. However, the results for the POSIX locale
seem odd. I think it would make more sense for POSIX to default to
Sunday as the first day of the week, rather than Saturday.

 $ gcc -o test test.c
 $ ./test
 POSIX: Saturday
 en_US: Sunday
 en_GB: Sunday
 es_ES: Sunday
 nl_NL: Sunday
 fi_FI: Monday

I've attached the sample code that generates the above.

-- 
gram
#include langinfo.h
#include locale.h
#include stdio.h
#include time.h

void
foo(const char *s)
{
	struct tm tm;
	char buf[16];

	setlocale(LC_ALL, s);
	tm.tm_wday = *nl_langinfo(_NL_TIME_FIRST_WEEKDAY) - 1;

	setlocale(LC_ALL, C);
	strftime(buf, sizeof(buf), %A, tm);
	printf(%s: %s\n, s, buf);
}

int
main(int argc, char *argv[])
{
	foo(POSIX);
	foo(en_US);
	foo(en_GB);
	foo(es_ES);
	foo(nl_NL);
	foo(fi_FI);
	return 0;
}


Bug#327025: C locale has bad default for _NL_TIME_FIRST_WEEKDAY

2005-09-07 Thread Denis Barbier
On Wed, Sep 07, 2005 at 01:18:42AM -0500, Graham Wilson wrote:
 Package: locales
 Version: 2.3.5-6
 Severity: normal
 
 The _NL_TIME_FIRST_WEEKDAY symbol, when passed to nl_langinfo, is
 supposed to give the first day of the week. This seems to work
 correctly for most locales. However, the results for the POSIX locale
 seem odd. I think it would make more sense for POSIX to default to
 Sunday as the first day of the week, rather than Saturday.
 
  $ gcc -o test test.c
  $ ./test
  POSIX: Saturday
  en_US: Sunday
  en_GB: Sunday

Hi Graham,

you are fully right, but technically this is a bug in locale and localedef
programs, which belongs to the libc6 package.  I do not know whether it
makes sense to reassign it.  This bug has been reported upstream
  http://sources.redhat.com/bugzilla/show_bug.cgi?id=181
on 2004-05-25 with a patch, hopefully upstream will give a comment
soon :-/

Denis


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Processed: Re: Bug#327025: C locale has bad default for _NL_TIME_FIRST_WEEKDAY

2005-09-07 Thread Debian Bug Tracking System
Processing commands for [EMAIL PROTECTED]:

 reassign 327025 libc6
Bug#327025: C locale has bad default for _NL_TIME_FIRST_WEEKDAY
Bug reassigned from package `locales' to `libc6'.

 thanks
Stopping processing here.

Please contact me if you need assistance.

Debian bug tracking system administrator
(administrator, Debian Bugs database)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#327025: C locale has bad default for _NL_TIME_FIRST_WEEKDAY

2005-09-07 Thread Graham Wilson
reassign 327025 libc6
thanks

On Wed, Sep 07, 2005 at 10:15:38PM +0200, Denis Barbier wrote:
 On Wed, Sep 07, 2005 at 01:18:42AM -0500, Graham Wilson wrote:
  The _NL_TIME_FIRST_WEEKDAY symbol, when passed to nl_langinfo, is
  supposed to give the first day of the week. This seems to work
  correctly for most locales. However, the results for the POSIX locale
  seem odd. I think it would make more sense for POSIX to default to
  Sunday as the first day of the week, rather than Saturday.
 
 you are fully right, but technically this is a bug in locale and localedef
 programs, which belongs to the libc6 package.  I do not know whether it
 makes sense to reassign it.  This bug has been reported upstream
   http://sources.redhat.com/bugzilla/show_bug.cgi?id=181
 on 2004-05-25 with a patch, hopefully upstream will give a comment
 soon :-/

I filed it against the locales package first since I assumed the fix was
in the file /usr/share/i18n/locales/POSIX, which is in the locales
package.

Reassigning to libc6 sounds fine, but are you sure the bug is in the
locale and localedef programs? Isn't it in the library source itself?

-- 
gram


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]