public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Rafal Luzynski <digitalfreak@lingonborough.com>
Cc: libc-alpha@sourceware.org
Subject: Re: [RFC][PATCH v4 06/11] Provide backward compatibility for strftime family (bug 10871).
Date: Thu, 10 Nov 2016 12:41:00 -0000	[thread overview]
Message-ID: <9e1a0812-56fc-a002-a12c-59d7882cf19f@redhat.com> (raw)
In-Reply-To: <1326125332.562051.1478737983449@poczta.nazwa.pl>

On 11/10/2016 01:33 AM, Rafal Luzynski wrote:

> I've discussed all possible solutions in [1], including what you
> have proposed here. Shortly, no solution is perfect and each has
> its advantages and disadvantages. Your solution has these pros:
>
> - does not cause any backward compatibility issues;
> - does not break any existing application where the current solution
>   is correct.
>
> At the same time it has the following cons:
>
> - introduces incompatibilities with *BSD family (including OS X) and
>   with the probable future POSIX specification which will remain
>   forever - please read below why I find it important;

Even the FreeBSD situation is in support of my proposal because 
implementing it would improve date formatting:

[root@bsd ~]# uname -a
FreeBSD bsd 11.0-RELEASE-p1 FreeBSD 11.0-RELEASE-p1 #0 r306420: Thu Sep 
29 01:43:23 UTC 2016 
root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
[root@bsd ~]# LC_ALL=ca_ES.UTF-8 date -j 201604141000
dijous, 14 de d’abril de 2016, 10:00:00 UTC
[root@bsd ~]# LC_ALL=ca_ES.UTF-8 cal
   De novembre 2016
dg dl dt dc dj dv ds
        1  2  3  4  5
  6  7  8  9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30

In the date case, this is not even a third-party application using a 
hard-coded strftime argument, it's right in the base operating system, 
in the locale data.

I couldn't test Thunderbird because it did not pick up the Catalan 
language pack for some reason, but the sources use "de %B" as a date 
format, so I expect that they are broken on FreeBSD, too.

I think this shows that whatever is currently proposed for POSIX has 
plenty of unintended consequences.

> - does not actually solve the problem for any existing application
>   until the authors or translators change %B to %OB (in case of open
>   source programs we can reach the upstreams and suggest solution).

Yes, but this has to be weighed against all the applications which are 
broken after the change.

> My solution has these pros:
>
> - will automagically solve the problems for all applications where
>   it is broken;

Not true, see the FreeBSD example, where the full-format date string is 
still incorrect.

> - will remain compatible with an existing *BSD solution and possible
>   future POSIX specification.

FreeBSD has to fix things anyway, so changing the approach would not 
create additional work for them.

> Also has this disadvantage:
>
> - will break some existing applications where current solution is correct;

Some?  Most exiting applications (which use date formats) for some 
locales, I would say.

> but:
>
> - in case of open source software we can reach the upstreams and suggest
>   solution;
> - in case of closed source software distributed in a binary form we can
>   provide a backward compatible ABI which will provide the old behaviour
>   for older programs.

I think we should, if at all possible, avoid situations were mere 
recompilation of an application introduces subtle changes.  Software is 
increasingly bundled and compiled by downstream developers and not 
distributions.

> I believe there are less cases where the a month name is displayed
> standalone than those where it is displayed with a day number therefore
> I believe that a fallout caused by applications broken by my solution
> is smaller than the fallout caused by the applications broken now.

This might be true for affected Slavic locales (but I haven't investigated).

> And the severity of the new bugs is equal to the severity of the current
> bugs.

I think for Romance languages with elision, the slightly incorrect “de” 
is preferred to the “de de” or “de d'” we'd get with your approach (and 
as the FreeBSD example shows, these situations are hardly temporary, but 
the bugs stick around for quite some time).

>> I am worried that this puts pressure on us *not* to
>> introduce mangled month names at all for these languages.
>
> Local language communities will have a chance to decide whether
> they want this change or not. Same as with German, no change will
> be visible until the locale data are updated. Each language will have
> to provide their data, or, if all locale data will be copied from CLDR,
> they will be able to revert the change.

They do not have much choice here if they do not want to break most 
applications temporarily.

Florian

  reply	other threads:[~2016-11-10 12:41 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-28  0:49 Rafal Luzynski
2016-11-04 13:40 ` Florian Weimer
2016-11-05 10:53   ` Rafal Luzynski
2016-11-07 14:13     ` Florian Weimer
2016-11-08 11:39       ` Rafal Luzynski
2016-11-09 10:49         ` Florian Weimer
2016-11-10  0:33           ` Rafal Luzynski
2016-11-10 12:41             ` Florian Weimer [this message]
2016-11-10 18:42               ` Rafal Luzynski
2016-11-10 19:19                 ` Andreas Schwab
2016-11-15  1:21                   ` Rafal Luzynski
2016-11-11  3:52             ` Rical Jasan
2016-11-15  1:38               ` Rafal Luzynski
2016-11-15 11:09                 ` Rafal Luzynski
2016-11-16 13:06                 ` Rical Jasan
2016-11-17 11:18                   ` Rafal Luzynski
2016-11-18  9:22                     ` Rical Jasan
2016-11-22 23:56                       ` Rafal Luzynski
2016-11-09 11:00       ` Florian Weimer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9e1a0812-56fc-a002-a12c-59d7882cf19f@redhat.com \
    --to=fweimer@redhat.com \
    --cc=digitalfreak@lingonborough.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).