Purpose of this RFC is described in bug #60429
The purpose of the functions utf8_encode and utf8_decode are time and again misunderstood and have probably caused more encoding related problems than they have solved. The biggest reason for this is their naming. Their purpose is to *convert* the encoding of a string from ISO-8859-1 to UTF-8, yet they are named in a way that suggests some other magical function that is necessary to work with UTF-8 text. Users looking for “UTF-8 support” in their app quickly find these functions due to their naming and use them without understanding what they do, often only testing with ASCII text which appears to work fine of first sight.
Why is ISO-8859-1 presumed to be the default encoding when converting to UTF-8, hence why do these functions occupy such a prominent spot in the namespace? There's simply no good reason for it.
The same functionality is available through iconv and mb_convert_encoding. Therefore I suggest to slowly deprecate utf8_encode and utf8_decode to clear up a recurring confusion and consolidate features into the existing, much more versatile iconv and mb_ functions.
Use of utf_*() is deprecated in favor of generic encoding conversion functions.
Use mbstring, iconv or intl module feature to convert character encoding.
Programs use utf8_decode() and utf8_encode() for ISO-8859-1 to/from UTF-8 conversion should use other encoding conversion function available. e.g. mb_convert_encoding()
None
XNL module
None
None
No change.
None
Other XML module features except utf8_decode() and utf8_encode() are unaffected.
* Remove or alias functions in the future.
State whether this project requires a 2/3
Vote starts: 2016/09/10
Vote ends: 2016/09/20 23:59:59 UTC
* N/A
Keep this updated with features that were discussed on the mail lists.