Project

General

Profile

9447a.patch

Teodor Gorghe, 05/20/2025 08:41 AM

Download (1.58 KB)

View differences:

new/src/com/goldencode/p2j/xml/XDocumentImpl.java 2025-05-20 12:39:06 +0000
907 907
         try
908 908
         {
909 909
            longchar lc = (longchar) source;
910
            logical retVal = new logical();
910 911
            String content = lc.toStringMessage();
911 912
            
912 913
            // TODO: I18N implications need to be handled, this is probably WRONG!
913 914
            ByteArrayInputStream bais = new ByteArrayInputStream(content.getBytes());
914
            xdoc = XmlHelper.parse(bais,
915
                                   validate.getValue(),
916
                                   null,
917
                                   !isSuppressNamespaceProcessing);
918
            
919
            return new logical(true);
915
            String encoding = XmlHelper.readXMLEncoding(bais);
916
            if (encoding == null)
917
            {
918
               encoding = I18nOps.getJavaCharset();
919
            }
920
            InputSource is = new InputSource(new InputStreamReader(bais, encoding));
921
            is.setEncoding(encoding);
922

  
923
            xdoc = XmlHelper.parse(is,
924
                                   validate.booleanValue(), // unknown & false mean no validation
925
                                   !isSuppressNamespaceProcessing,
926
                                   retVal, // OUTPUT param mechanism
927
                                   buildSchema());
928

  
929
            return retVal;
920 930
         }
921 931
         catch (IOException | ParserConfigurationException e)
922 932
         {