>
> On Fri, Feb 2, 2024 at 2:00 AM youkidearitai <youkideari...@gmail.com>
> wrote:
>
> > Hi, Internals
> >
> > I have just opened the voting "Multibyte ucfirst and lcfirst functions"
> > RFC.
> > https://wiki.php.net/rfc/mb_ucfirst
> >
> > Voting will be open until February 26th, 2024 at 01:00 UTC.
> >
> > Cheers
> > Yuya
> >
> > --
> > ---------------------------
> > Yuya Hamada (tekimen)
> > - https://tekitoh-memdhoi.info
> > - https://github.com/youkidearitai
> > -----------------------------
> >
> > --
> > PHP Internals - PHP Runtime Development Mailing List
> > To unsubscribe, visit: https://www.php.net/unsub.php
> >
> >
> In the proposal part is mentioned "From what I've researched with Unicode,
> it may not behave as expected in some languages. In that case, please deal
> with it in userland.". If my understanding here is wrong, please correct
> me. ucfirst and lcfirst are to uppercase/lowercase the first character of a
> word for characters that have an upper/lower case variant. Whether or not a
> word _should_ have an uppercase or lower case character is not important
> and currently doesn't behave in such a way for ucfirst and lcfirst. To me
> this isn't unexpected behavior, that's exactly how I would expect it to
> behave.
>

I think the author refers to the potential edge cases in certain Unicode
mappings. There isn't an ucfirst  mapping, but there are uppercase and
titlecase mappings.

Unicode titlecase mapping is different from uppercase mapping. This PR
seems to be using uppercase mapping. This should not matter for a vast
majority of characters, except for ligatures and digraphs.

I'm not at all and expert in these edge cases, but I just wanted to put my
two cents forth that I personally think using titlecase mapping on the
first word would be the more appropriate approach.

Thank you.

>

Reply via email to