It was found that libxml2 version 2.13.0 and later does not
handle UTF-8 tag names correctly. This appears to have been
the cause of the PHP's bug.

Can you revert libxml2 of Macports to one of the stable
versions (libxml2 2.12.*)? There must be a lot of outages
happening all over the world due to this bug.

The results of 'test' program are shown below.
(I have attached 'test.cc' to this email.)

[libxml2 2.12.9]
This version works correctly.

$ c++ -O -I/usr/local/2.12.9/include/libxml2 -L/usr/local/2.12.9/lib
-lxml2 test.cc -o test
$ ./test
text1

[libxml2 2.13.0]
This version does not work.

$ c++ -O -I/usr/local/2.13.0/include/libxml2 -L/usr/local/2.13.0/lib
-lxml2 test.cc -o test
$ ./test
XPath error : Invalid expression
/文書
 ^

[libxml2 2.13.4 (the current version of Macports)]

This version does not work too.

$ c++ -O -I/usr/local/2.13.4/include/libxml2 -L/usr/local/2.13.4/lib
-lxml2 test.cc -o test
$ ./test
XPath error : Invalid expression
/文書
 ^

Thanks,
Shigio

On Mon, Oct 28, 2024 at 5:39 PM Ryan Carsten Schmidt
<[email protected]> 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 <[email protected]>
PGP fingerprint:
26F6 31B4 3D62 4A92 7E6F  1C33 969C 3BE3 89DD A6EB

Attachment: test.cc
Description: Binary data

Reply via email to