Re: What should we do with utf8_encode and utf8_decode?
From: Kamil Tekiela Date: Mon, 22 Mar 2021 15:34:49 +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-113675@lists.php.net to get a copy of this message
> > I'm using utf8_encode()/utf8_decode() to make input string safe to be > stored in DB, and back. In most cases the input is utf-8, but it > occasionally may contain "broken characters". > What exactly do you mean by making the input string safe? If I understand correctly utf8_decode(utf8_encode($str)) should just be an identity function. Could you please explain what is the purpose of using these functions in such a way?
Thread (40 messages)
| « previous | php.internals (#113675) | next » |
|---|