On 1/16/07, Marshall Schor <[EMAIL PROTECTED]> wrote:

Lev Kozakov wrote:
> <snip> So, should we just consider the XML encoding test not supported
> and return
> w/o a failure, if the returned 'encoding' string is 'null' ? The
> problem is
> that in the real case the PEAR installation may fail.
>


I suggest checking the "version" of Java, and if it is Java 1.4.x, skip
the test.  Otherwise do the test.
This way, we get a good test for Java 5 and onwards, and the failure on
1.4 doesn't block
building.


-Marshall


Actually, we need to check both the Java version (java.version) and its
vendor (java.vendor), since IBM Java 1.4.x works fine with XML BOM. There is
no problem to skip the test, but real PEAR installation may fail, if one of
the descriptors contains BOM. The best solution, probably, is removing BOM
from XML descriptors when running under Sun's JVM 1.4.x, but this goes far
beyond the PEAR installation. To make the PEAR installation (and all the
tests) work with all Java versions, I propose complete removal of XML
validation call (isValidXmlFile) from the 'detectXmlFileEncoding' method.
This is the call that leads to failures in Sun's Java 1.4.x with XML files
containing BOM.

-- Lev

Reply via email to