PHP83 doesn't handle multi-byte encoded XML correctly.

Shigio YAMAGUCHI shigio at gnu.org
Wed Oct 30 22:36:56 UTC 2024


Thank you for your advice.

> did you install php-mbstring ?

Yes. I always install it. That doesn't affect the problem.

Just to be clear, adding the following header also has
no effect on the results:
<?xml version="1.0" encoding="UTF-8"?>

By the way, is this problem reproducible in your environment?
I'd like to know that first though.

On Thu, Oct 31, 2024 at 4:18 AM Fabien Auréjac <fabien.aurejac at gmail.com> wrote:
>
> did you install php-mbstring ?
>
> it's needed since quite a long time for multi-byte chars handling inside php.
>
> But my advice may be irrelevant since it's inside xml. I don't know.
>
> Le 30/10/2024 à 05:06, Shigio YAMAGUCHI a écrit :
>
> On Mon, Oct 28, 2024 at 5:39 PM Ryan Carsten Schmidt
> <ryandesign at macports.org> wrote:
>
> I'm not sure why it doesn't work for you and I can't investigate it at the moment.
>
> Is this problem reproducible in your environment?
>
> What was different when it worked before? Different macOS, php, libxml2 version?
> There are several php versions in MacPorts; can you try others? If they aren't all
> affected, which ones are or aren't?
>
> Thanks for your helpful advice.
>
> I have tested the following versions of PHP:
>
> php74, php80, php82
>
> The problem was reproduced in all of the above versions.
> So, it doesn't seem to be a problem with PHP itself.
>
> I also tested it on an older MacOS below:
> It works correctly. It uses an older version of libxml2.
>
> MacOS Catalina 10.15.7
> php56 @5.6.40_7 (lang, www)
> libxml2 @2.12.7 (textproc)      <=== 2.12.7
> libiconv @1.17 (textproc)
>
> Below is the environment in which the problem occurs:
>
> [does not work correctly]
> MacOS Sonoma 14.5
> php83 @8.3.12_1 (lang, www)
> libxml2 @2.13.4 (textproc)      <=== 2.13.4
> libiconv @1.17 (textproc)
>
> Is there a way to restore older versions of libxml2?
>
> On Mon, Oct 28, 2024 at 5:39 PM Ryan Carsten Schmidt
> <ryandesign at macports.org> wrote:
>
> On Oct 27, 2024, at 20:51, Shigio YAMAGUCHI wrote:
>
> Hello all,
> I installed php83 on MacOS Sonoma 14.5 (M1 Mac),
> but for some reason, it was unable to correctly process
> XML containing multi-byte characters (UTF-8). It was
> previously handled correctly.
>
> I'm not sure why it doesn't work for you and I can't investigate it at the moment.
>
> I didn't find any results on Google that looked relevant.
>
> I'm not aware of anything we're doing in MacPorts to cause this.
>
> What was different when it worked before? Different macOS, php, libxml2 version? There are several php versions in MacPorts; can you try others? If they aren't all affected, which ones are or aren't?
>
> It may be a php bug; if so, you could report it to them, after searching the php issue tracker to see if it's already been reported.
>
>
>
>


-- 
Shigio YAMAGUCHI <shigio at gnu.org>
PGP fingerprint:
26F6 31B4 3D62 4A92 7E6F  1C33 969C 3BE3 89DD A6EB


More information about the macports-users mailing list