Re: default_encoding RFC – aftermath
| From: | Christoph M. Becker | Date: | Sun, 12 Aug 2018 21:11:01 +0000 |
| Subject: | Re: default_encoding RFC – aftermath | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-103089@lists.php.net to get a copy of this message | ||
Hi Andrea!
On 12.08.2018 at 19:57, Andrea Faulds wrote:
> Christoph M. Becker wrote:
>
>> I'm quite happy, though, that this
>> hasn't happened yet, since it seems that the encoding names may be
>> different between the extensions. At least the php.net manual states[2]:
>>
>> | Some systems (like IBM AIX) use "ISO8859-1" instead of "ISO-8859-1"
>> so
>> | this value has to be used in configuration options and function
>> | parameters.
>>
>> It appears to be worthwhile to review the deprecation of the respective
>> iconv.* ini options. Not quite sure about the mbstring.* ini options.
>
> Could this not be solved by making all the extensions support all the
> encoding name aliases or so? That wouldn't be difficult to implement and
> wouldn't break anything.
I think that would only be possible, if we knew how they have to be
mapped. Consider the AIX example above; I'm not even sure if this is
(still) valid, but should we have special maps for AIX? Should we try
to detect this during configuration? I'm not sure if that's even
reliably possible, since some iconv implementations (which ones?) do not
support errno[1], so we can't detect whether iconv_open() failed with
EINVAL, or some other error. As it is now, it's simply up to the user
to pass a supported encoding name.
[1]
<https://github.com/php/php-src/blob/php-7.3.0beta1/ext/iconv/config.m4#L125>
--
Christoph M. Becker