2024年2月2日(金) 18:15 Ayesh Karunaratne <ayesh@php.watch>: >> >> 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.
Hi, Thank you for reply. > > 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. > Yes, Ayesh is right. This is a text that is the result of investigating edge cases. > 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. I see. I'll change mb_ucfirst using titlecase. Thank you. Regards 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