bug-sh-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: date default output format : locale-dependency


From: Jim Meyering
Subject: Re: date default output format : locale-dependency
Date: 12 Nov 2000 11:04:50 +0100
User-agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7

Thanks for pointing that out!
I've just added a comment to that effect, instead.

Index: date.c
===================================================================
RCS file: /fetish/shellutils/src/date.c,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -r1.98 -r1.99
--- date.c      2000/10/26 22:36:39     1.98
+++ date.c      2000/11/12 10:02:29     1.99
@@ -461,6 +461,13 @@
       else
        {
          char *date_fmt = DATE_FMT_LANGINFO ();
+         /* Do not wrap the following literal format string with _(...).
+            For example, suppose LC_ALL is unset, LC_TIME="POSIX",
+            and LANG="ko_KR".  In that case, POSIX.2 says that LC_TIME
+            determines the format and contents of date and time strings
+            written by date, which means "date" must generate output
+            using the POSIX locale; but adding _() would cause "date"
+            to use a Korean translation of the format.  */
          format = *date_fmt ? date_fmt : "%a %b %e %H:%M:%S %Z %Y";
        }
     }

Paul Eggert <address@hidden> wrote:
| > From: Jim Meyering <address@hidden>
| > Date: 11 Nov 2000 09:00:55 +0100
|
| > I'll probably go ahead and add _() regardless,
| > for those systems that lack _DATE_FMT.
|
| Adding _() doesn't sound right to me, as it would cause "date" to not
| conform to POSIX in some cases.  For example, suppose LC_ALL is unset,
| LC_TIME="POSIX", and LANG="ko_KR".  In that case, POSIX.2 says that
| LC_TIME determines the format and contents of date and time strings
| written by date, which means "date" must generate output using the
| POSIX locale; but adding _() would cause "date" to use a Korean
| translation of the format.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]