# [DISCUSSION] Fix mb_trim inaccurate $character

- Thread: https://externals.io/message/122908
- Original archive: https://news-web.php.net/php.internals/122908
- Started by youkidearitai on 2024-04-03T08:02:02+00:00
- Messages: 7
- RFC: Change the default of $characters in mb_trim function (Under discussion) — https://externals.io/rfc/mb_trim_change_characters.md
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #122908 — youkidearitai — 2024-04-03T08:02:02+00:00

URL: https://externals.io/message/122908#122908

Hi, Internals
Found two problem with mb_trim, mb_ltrim and mb_rtrim functions.

- https://github.com/php/php-src/issues/13789
- https://github.com/php/php-src/issues/13815

Therefore, I think require an RFC, I have written a draft an RFC that
fixes these issues.
https://wiki.php.net/rfc/mb_trim_change_characters

Feel free to comments on this.

Regards
Yuya

-- 
---------------------------
Yuya Hamada (tekimen)
- https://tekitoh-memdhoi.info
- https://github.com/youkidearitai

---

## #122916 — tim@bastelstu.be — 2024-04-03T21:30:24+00:00

URL: https://externals.io/message/122908#122916 · In reply to: #122908

Hi


> Therefore, I think require an RFC, I have written a draft an RFC that
> fixes these issues.
> https://wiki.php.net/rfc/mb_trim_change_characters

I don't think this (widening the type and changing the default value to 
obtain the *intended* behavior) requires an RFC. It's a bugfix, a bugfix 
with a slightly larger observable impact than other bugfixes.

Best regards
Tim Düsterhus

---

## #122923 — youkidearitai — 2024-04-04T04:25:50+00:00

URL: https://externals.io/message/122908#122923 · In reply to: #122916

2024年4月4日(木) 6:30 Tim Düsterhus <tim@bastelstu.be>:
>
> Hi
>
> 
> > […]
>
> I don't think this (widening the type and changing the default value to
> obtain the *intended* behavior) requires an RFC. It's a bugfix, a bugfix
> with a slightly larger observable impact than other bugfixes.
>
> Best regards
> Tim Düsterhus

Hi
Thank you very much for comment.

I would like to discuss this RFC with all of you, as we have not yet
decided on the correct revision policy.
I created the RFC for that purpose.

Still waiting for your comments!
Thank you.

Yuya

-- 
---------------------------
Yuya Hamada (tekimen)
- https://tekitoh-memdhoi.info
- https://github.com/youkidearitai

---

## #123120 — Nicolas Grekas — 2024-04-12T09:32:29+00:00

URL: https://externals.io/message/122908#123120 · In reply to: #122923

Hi

Le jeu. 4 avr. 2024 à 07:41, youkidearitai <youkidearitai@gmail.com> a
écrit :

> 2024年4月4日(木) 6:30 Tim Düsterhus <tim@bastelstu.be>:
> > […]
>
> Hi
> Thank you very much for comment.
>
> I would like to discuss this RFC with all of you, as we have not yet
> decided on the correct revision policy.
> I created the RFC for that purpose.
>
> Still waiting for your comments!
> Thank you.
>
>
I also don't think this requires an RFC. This is a minor design issue that
has only one possible solution, so there is little to discuss.

Cheers,
Nicolas

---

## #123135 — youkidearitai — 2024-04-15T01:11:24+00:00

URL: https://externals.io/message/122908#123135 · In reply to: #123120

2024年4月12日(金) 18:32 Nicolas Grekas <nicolas.grekas+php@gmail.com>:
>
> Hi
>
> Le jeu. 4 avr. 2024 à 07:41, youkidearitai <youkidearitai@gmail.com> a écrit :
> > […]
>
> I also don't think this requires an RFC. This is a minor design issue that has only one possible solution, so there is little to discuss.
>
> Cheers,
> Nicolas

Hi,

I appreciate late my response.
I got it. I modified original an RFC
(https://wiki.php.net/rfc/mb_trim) that $character is default
parameter.
Please point out any problems, I revert it.

Regards
Yuya

-- 
---------------------------
Yuya Hamada (tekimen)
- https://tekitoh-memdhoi.info
- https://github.com/youkidearitai

---

## #123136 — Jorg Sowa — 2024-04-15T08:32:29+00:00

URL: https://externals.io/message/122908#123136 · In reply to: #123135

Hello Yuya,
I don't think modifying voted RFCs is allowed despite the size of the
change. Moreover, there are no dates of the voting included in the
description of the RFC so it's not clear for visitors when exactly the RFC
has been approved.

Kind regards,
Jorg

---

## #123137 — youkidearitai — 2024-04-15T08:42:18+00:00

URL: https://externals.io/message/122908#123137 · In reply to: #123136

2024年4月15日(月) 17:32 Jorg Sowa <jorg.sowa@gmail.com>:
>
> Hello Yuya,
> I don't think modifying voted RFCs is allowed despite the size of the change. Moreover, there are no dates of the voting included in the description of the RFC so it's not clear for visitors when exactly the RFC has been approved.
>
> Kind regards,
> Jorg

Hi, Jorg
Thank you very much.

> I don't think modifying voted RFCs is allowed despite the size of the change. Moreover, there are no dates of the voting included in the description of the RFC so it's not clear for visitors when exactly the RFC has been approved.

It was not good. Restored original an RFC.
Thank you

Yuya

-- 
---------------------------
Yuya Hamada (tekimen)
- https://tekitoh-memdhoi.info
- https://github.com/youkidearitai
