From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116323 invoked by alias); 9 Dec 2016 16:20:16 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 115033 invoked by uid 89); 9 Dec 2016 16:20:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=en_US, en_us, love, letter X-HELO: smtp.gentoo.org Date: Fri, 09 Dec 2016 16:20:00 -0000 From: Mike Frysinger To: Rafal Luzynski Cc: libc-alpha@sourceware.org, Jakub Martisko Subject: Re: [PATCH][BZ #15527] strftime_l.c: Support lowercase output Message-ID: <20161209162009.GX10558@vapier.lan> Mail-Followup-To: Rafal Luzynski , libc-alpha@sourceware.org, Jakub Martisko References: <576117B9.5080105@redhat.com> <57737EE8.8070706@redhat.com> <20161206232035.GH10558@vapier.lan> <5847E1D6.5040509@redhat.com> <20161207153904.GL10558@vapier.lan> <65344612.479215.1481246089816@poczta.nazwa.pl> <20161209040755.GU10558@vapier.lan> <2084633656.584531.1481281202974@poczta.nazwa.pl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ngiTnHdmUEG79yp6" Content-Disposition: inline In-Reply-To: <2084633656.584531.1481281202974@poczta.nazwa.pl> X-SW-Source: 2016-12/txt/msg00319.txt.bz2 --ngiTnHdmUEG79yp6 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 3862 On 09 Dec 2016 12:00, Rafal Luzynski wrote: > 9.12.2016 05:07 Mike Frysinger wrote: > > On 09 Dec 2016 02:14, Rafal Luzynski wrote: > > > 7.12.2016 16:39 Mike Frysinger wrote: > > > > [...] might be good to get wider opinion about new > > > > strftime flags though. > > > > > > Now I lean a little against this change. As I wrote before, > > > I'd love to see a flag to change the first letter to uppercase > > > (or to titlecase, if that's more appropriate). A flag to change > > > whole string to lowercase would be a workaround for this problem > > > if we also converted all months and weekdays names to the > > > titlecase in all languages, like in English now. > > > > i don't think changing the locale data or forcing titlecase everywhere > > makes sense. the data is already in the standard format that users > > expect for their locale. having a flag to support that seems like a > > good way to get developers to naively enforce their own expectations > > onto users. "my language writes things like 'Dec', therefore every > > language out there must use titlecase". >=20 > That's really not what I meant. I meant that switching all locale > data to titlecase would be possible only if there was a flag to > switch back to lowercase. i'm saying the flags are irrelevant. the data should be in the form that is appropriate for that locale. that might mean uppercase, or lowercase, or titlecase. flags would not help at all, and in fact, they would make things worse. en_US authors would see that, think that it's weird looking, and then use the titlecase flag. then it'd be broken for many other locales. > Yes, in my language (and I think that in most languages) we have > all months names and weekdays names in lowercase and this is correct > by default. But we have no flag to switch to titlecase and > I think it would be useful sometimes. i have a hard time seeing a valid usecase where the code forcing titlecase all the time would be desirable. forcing all lower or upper case isn't that hard to imagine (e.g. output forms where *all* content, not just dates, are in the respective cases). > > forcing to all uppercase or lowercase seems a bit more reasonable in > > certain outputs (everything is upper/lower case beyond the date). > > > > > But in that case, do you guys think that converting to lowercase > > > is useful if all letters are either lowercase already or should > > > be always as they are now? Can you explain why would any application > > > ever need the lowercase which should be provided by a format flag > > > rather than converting programmatically? It seems to be useful > > > only if some locales want to convert some data to lowercase and > > > they don't have it lowercase out of the box. > > > > we already have a flag to force it to uppercase. makes sense to have > > a flag to do the opposite. your arguments here apply to the uppercase > > flag too. >=20 > No, does not. I didn't say anything about uppercase, if I had > to say I'd say it's correct so let's leave it as it is now. > What I wanted to say is that we don't have a flag to switch > to titlecase. >=20 > My question was: what is the real problem solved by implementing > a flag to switch to lowercase? i didn't say you talked about uppercase. my point is that your argument isn't specific to lowercase. you could s/lower/upper/ and have the same points. so why do you think having uppercase makes sense but adding lowercase is wrong ? > And my suggestion is that it would be useful only if a locale > allows all-lowercase months or weekdays but locale data deliver > non-lowercase. For example titlecase. This would solve two problems: > - provide titlecase, > - provide an easy way to generate lowercase. locale data cannot be changed. adding flags to transform their case would not help the situation at all, just make it worse. -mike --ngiTnHdmUEG79yp6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYStm5AAoJEEFjO5/oN/WBodYP/0nq8FWrLCkCPLofw0Ku9DWR jbasejq17UBXZi8OFxxvxEJQjLOtbhB4JYvMuO7z4KfTx12nCr21JU7aAZoZmar5 rD7/gHN8H1XIfpI3ZhxBstrsqrRTNoquI0OHXpvsyZIKBGiWbB/hUeu9NkpR+kHv T6t4CGzXrt8oTk64CyGbK3n3ZWjw26hcc8mvSea2G4Vu3qEQxFH1ye4Z0TWQZBh9 YgEPXp6XSJjEM0eNCTLKYmlyR9Kb1vpCvhzvhhp0F87a8R6KiLqIw0o/JHrSxTzD HIgV1omkdDLFoyLZk8bB8aP6oQiBsBB9qviz2bwIPIT1nn8ahhpUBZYWZhHFSQQA e+jQHha4JEYvtffgVM3ZGZoN8M3JJOF0SeAMQ6mP0nWQLaTYChYecde0PkPxQBVS ONs8WqU6TT2IujtiUJh2DVRhC2RAlVEhoET9syrbyk4AaEFPVKrejIiodZS0+Z4Z ooPLCD95lvtx9RiiCdaWCS6L1+VHkLudA5GlxjjVP0O/rj95InqEuajXBIONjpPd Im84DRfrcpbL+8xAjs3NCxdQhyYC7mh8/V+O++5J2gvz2rj1/HPRGqQf5BJX/DY/ WgD4knXfWOtoKpEIB/6nBbbDjAgG2Jp5di9mdrmSMzAA7nNOUmJA9ttqJufwMfYL NoJW9RlkzmmPtJKMBrV+ =8P+v -----END PGP SIGNATURE----- --ngiTnHdmUEG79yp6--