Re: [RFC] Deprecate and Remove utf8_encode and utf8_decode
| From: | Rowan Tommins | Date: | Sat, 26 Mar 2022 22:22:44 +0000 |
| Subject: | Re: [RFC] Deprecate and Remove utf8_encode and utf8_decode | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-117434@lists.php.net to get a copy of this message | ||
On 24/03/2022 11:19, Rowan Tommins wrote:
Maybe I'm trying to be "too helpful" there. Should we just use the generic deprecation message, and let people look up the in-depth explanation in the manual? Anyone have any thoughts on that? Regards, -- Rowan Tommins [IMSoP]I have one issue with the wording in the RFC: While “Function utf8_encode is deprecated; check usage is correct and consider mb_convert_encoding or other replacement.” suggests to replace it, the part about checking the usage implies that if someone is sure about the correct usage it is fine to keep using utf8_encode(). But as the proposal wants to remove it for 9.0 I think this is somewhat misleading.That's a fair point. The intention was to encourage people to look at whether they were using the function right in the first place, not blindly replace it with mb_convert_encoding, since the whole point of the deprecation is that they probably aren't. I'm not sure how to concisely say "replace with mb_convert_encoding if you actually need to, but maybe you can just delete this function call and your code will be better".