[MacPorts] #57746: coreutils date: localized output keeps C locale order
MacPorts
noreply at macports.org
Sat Dec 8 11:02:19 UTC 2018
#57746: coreutils date: localized output keeps C locale order
--------------------+-----------------------
Reporter: ednl | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Keywords: | Port: coreutils
--------------------+-----------------------
Concerning: macOS 10.4.2, MacPorts 2.5.4, coreutils 8.30, GNU date. I use
the nl_NL.UTF-8 locale on my Mac:
{{{
$ locale
LANG="nl_NL.UTF-8"
LC_COLLATE="nl_NL.UTF-8"
LC_CTYPE="nl_NL.UTF-8"
LC_MESSAGES="nl_NL.UTF-8"
LC_MONETARY="nl_NL.UTF-8"
LC_NUMERIC="nl_NL.UTF-8"
LC_TIME="nl_NL.UTF-8"
LC_ALL=
}}}
The localized output of `date' does translate the day and month names (but
not the timezone, which is expected maybe) but keeps the C-locale order:
{{{
$ LC_ALL=C /opt/local/bin/date
Sat Dec 8 11:32:02 CET 2018
$ LC_ALL=nl_NL.UTF-8 /opt/local/bin/date
za dec 8 11:32:24 CET 2018
}}}
That order is the same for any other locale. However, the order for my
locale should be "%a %e %b %Y %X %Z" as found in the macOS locale
definition:
{{{
$ /bin/date
za 8 dec 2018 11:54:44 CET
$ cat /usr/share/locale/nl_NL.ISO8859-1/LC_TIME | grep %Z
%a %e %b %Y %X %Z
}}}
(There is no separate UTF-8 definition for LC_TIME.) Or on my Debian
system, which is (effectively) the same:
{{{
$ cat /usr/share/i18n/locales/nl_NL | grep -A2 date_fmt
date_fmt "<U0025><U0061><U0020><U0025><U0065><U0020><U0025><U0062>/
<U0020><U0025><U0059><U0020><U0025><U006B><U003A><U0025><U004D><U003A>/
<U0025><U0053><U0020><U0025><U005A>"
}}}
There is no /opt/local/share/i18n/ directory on my MacPorts installation.
Is that the problem? Or should the definitions from /usr/share/locale/ be
used? It definitely seems wrong that the names are localized but the order
isn't.
--
Ticket URL: <https://trac.macports.org/ticket/57746>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list