This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][BZ #15527] strftime_l.c: Support lowercase output


9.12.2016 05:07 Mike Frysinger <vapier@gentoo.org> 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".

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.

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.

>
> 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.
> -mike

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.

My question was: what is the real problem solved by implementing
a flag to switch to lowercase?

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.

Regards,

Rafal


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]