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


5.12.2016 15:55 Jakub Martisko <jamartis@redhat.com> wrote:
>
>
> Hello Rafal,
>
> as for the order of ^# flags - right now the change case
> flag works as an upper case flag for options which are in
> title case by default (Sun -> SUN) and as lowercase for
> those, which are in uppercase by default (AM -> am). In my
> opinion, treating "%^#A" and "%#^A" as an idiom for lower
> case makes the most sense. If you consider "%#^A", the
> output would switch case (whatever that means) and then be
> switched to uppercase. The "#" flag would thus be ignored.

Yes, that's true. Switching the case and then converting to
uppercase wouldn't make sense. And this is how your patch
works, as far as I remember: it switches to lowercase no matter
what is the order of "#" and "^".

I think that this either should be documented or (maybe better)
should be treated as an undefined behavior: not documented,
maybe producing bad results, maybe even producing correct
results, maybe will be changed in future. It may be also
explicitly documented as undefined behavior.

> As for the title case part of your message, I am probably
> not the right person to answer it:-(.

I don't think so. :-) I thought you were a non-English native
speaker; sorry if I'm wrong but if I'm not then you can
provide some valuable input here. How does it look in your
native language? Are all months and weekdays names always
written in lowercase? Wouldn't you like them to start with
an uppercase letter sometimes? For example, if you display
a calendar would you prefer "December" or "december"
in the header? Or if you display a date with a weekday
would you prefer "Wednesday, 7th of december" or
"wednesday, 7th of decebmer"? What is your solution to
achieve a proper result?

Regards,

Rafal


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