[RFC] [Discussion] Add multibyte trim function (mb_trim, mb_ltrim and mb_rtrim)

php.internals

youkidearitai

2 years ago
Hi, internals. 8ctopus san can't send email, so I'm writing new RFC for multibyte trim function. https://wiki.php.net/rfc/mb_trim https://github.com/php/php-src/pull/12459 I would like to under discussion. Regards. Yuya
-- --------------------------- Yuya Hamada (tekimen) - https://tekitoh-memdhoi.info - https://github.com/youkidearitai -----------------------------

Niels Dossche

2 years ago
Hi Yuya On 19/10/2023 13:57, youkidearitai wrote:
> Hi, internals. > > 8ctopus san can't send email, so I'm writing new RFC for multibyte > trim function. > https://wiki.php.net/rfc/mb_trim > https://github.com/php/php-src/pull/12459 > > I would like to under discussion.
Thanks for this. I have a question about the .. support: You state "Mapping with other character codes may be incompatible", for one of the reasons not to support this. Can you please explain this a bit more? Also, I notice at the top of your RFC it still says: "Status: Draft", I think you forgot to change this. Similarly, the RFC is not listed under discussion on https://wiki.php.net/rfc.
> > Regards. > Yuya >
Kind regards Niels

youkidearitai

2 years ago
2023年10月19日(木) 22:33 Niels Dossche <dossche.niels@gmail.com>:
> > Hi Yuya > > On 19/10/2023 13:57, youkidearitai wrote: > > Hi, internals. > > > > 8ctopus san can't send email, so I'm writing new RFC for multibyte > > trim function. > > https://wiki.php.net/rfc/mb_trim > > https://github.com/php/php-src/pull/12459 > > > > I would like to under discussion. > > Thanks for this. > > I have a question about the .. support: > You state "Mapping with other character codes may be incompatible", for one of the reasons not to support this. > Can you please explain this a bit more? > > Also, I notice at the top of your RFC it still says: "Status: Draft", I think you forgot to change this. > Similarly, the RFC is not listed under discussion on https://wiki.php.net/rfc. > > > > > Regards. > > Yuya > > > > Kind regards > Niels > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php >
Hi, Niels. Thank you for your question and Wiki status is changed.
> You state "Mapping with other character codes may be incompatible", for one of the reasons not to support this. > Can you please explain this a bit more?
Sure. For example, Japanese character code, If try to match hiragana for each character code, it will end up with different bytes. Hiragana letter matches in UTF-8. [ぁ-ゞ] But other character code is sometimes different. example: EUC-JP [ぁ-ん゛ゝゞ] Sometimes the order is different why I say "Mapping with other character codes may be incompatible". Therefore, I thought it was impossible to express the ".." notation. Regards Yuya
-- --------------------------- Yuya Hamada (tekimen) - https://tekitoh-memdhoi.info - https://github.com/youkidearitai -----------------------------