Re: What should we do with utf8_encode and utf8_decode?

From: Date: Mon, 22 Mar 2021 20:04:40 +0000
Subject: Re: What should we do with utf8_encode and utf8_decode?
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-113702@lists.php.net to get a copy of this message
On Mon, Mar 22, 2021 at 10:04 AM Aleksander Machniak <alec@alec.pl> wrote:

>     $str = "グーグル谷歌中信фδοκιμήóźdźрöß😁😃";
>
>     $this->assertSame($str, utf8_decode(utf8_encode($str)));
>
>
Woah. Yeah. No.  Don't do that.
Doing that is what's wrong with utf8_en/decode().
Doing that convinces me that Rowan is right and we should deprecate then
remove those functions without offering a simple replacement.
Christ's sake... no.


Thread (40 messages)

« previous php.internals (#113702) next »