You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "David Bertoni (JIRA)" <xa...@xml.apache.org> on 2005/06/30 21:03:56 UTC

[jira] Created: (XALANC-532) FormatterToXMLUnicode does not serialiez UTF-8 correctly

FormatterToXMLUnicode does not serialiez UTF-8 correctly
--------------------------------------------------------

         Key: XALANC-532
         URL: http://issues.apache.org/jira/browse/XALANC-532
     Project: XalanC
        Type: Bug
  Components: XalanC  
    Versions: CurrentCVS    
    Reporter: David Bertoni
 Assigned to: David Bertoni 
    Priority: Critical
 Attachments: patch.txt

There are some serious bugs that result in incorrect serialization.  A patch is attached.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANC-532) FormatterToXMLUnicode does not serialiez UTF-8 correctly

Posted by "David Bertoni (JIRA)" <xa...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XALANC-532?page=comments#action_12314800 ] 

David Bertoni commented on XALANC-532:
--------------------------------------

Note also there are some issues with serializer character references properly in many cases.  The patch also contains fixes for those problems.

> FormatterToXMLUnicode does not serialiez UTF-8 correctly
> --------------------------------------------------------
>
>          Key: XALANC-532
>          URL: http://issues.apache.org/jira/browse/XALANC-532
>      Project: XalanC
>         Type: Bug
>   Components: XalanC
>     Versions: CurrentCVS
>     Reporter: David Bertoni
>     Assignee: David Bertoni
>     Priority: Critical
>  Attachments: patch.txt
>
> There are some serious bugs that result in incorrect serialization.  A patch is attached.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Updated: (XALANC-532) FormatterToXMLUnicode does not serialize UTF-8 correctly

Posted by "David Bertoni (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANC-532?page=all ]

David Bertoni updated XALANC-532:
---------------------------------

    Summary: FormatterToXMLUnicode does not serialize UTF-8 correctly  (was: FormatterToXMLUnicode does not serialiez UTF-8 correctly)

> FormatterToXMLUnicode does not serialize UTF-8 correctly
> --------------------------------------------------------
>
>          Key: XALANC-532
>          URL: http://issues.apache.org/jira/browse/XALANC-532
>      Project: XalanC
>         Type: Bug
>   Components: XalanC
>     Versions: CurrentCVS
>     Reporter: David Bertoni
>     Assignee: David Bertoni
>     Priority: Critical
>  Attachments: patch.txt
>
> There are some serious bugs that result in incorrect serialization.  A patch is attached.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANC-532) FormatterToXMLUnicode does not serialize UTF-8 correctly

Posted by "Dmitry Hayes (JIRA)" <xa...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XALANC-532?page=comments#action_12317665 ] 

Dmitry Hayes commented on XALANC-532:
-------------------------------------

Thanks for the comments! I have no problem is #1 - #4 comments: the latest patch for the defect contains them. I should think more about suggestion #5. The initial 
idea was to keep the common functionality in the base class, XalanFormatterWriter , and then derive from it Writers for specific encodings. Such, XalanFormatterWriter is a base class XalanUTF16Writer , XalanUTF8Writer and XalanOtherEncodingWriter. And the initial intension was to use the classic inheritance without any virtual functions. User should not create any pointer from type XalanFormatterWriter.


> FormatterToXMLUnicode does not serialize UTF-8 correctly
> --------------------------------------------------------
>
>          Key: XALANC-532
>          URL: http://issues.apache.org/jira/browse/XALANC-532
>      Project: XalanC
>         Type: Bug
>   Components: XalanC
>     Versions: CurrentCVS
>     Reporter: David Bertoni
>     Assignee: David Bertoni
>     Priority: Critical
>  Attachments: patch.txt, patch.txt
>
> There are some serious bugs that result in incorrect serialization.  A patch is attached.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANC-532) FormatterToXMLUnicode does not serialize UTF-8 correctly

Posted by "Dmitry Hayes (JIRA)" <xa...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XALANC-532?page=comments#action_12315093 ] 

Dmitry Hayes commented on XALANC-532:
-------------------------------------

I'm not sure if the problem is related to UTF8: we concentrate all the encoding related code inside of the XalanUTF8(UTF16/OtherEncoding)Writers. FormatterToXMLUnicode code should be encoding independent.
I support enhance of the s_specialChars1_1 special characters table, 
but we still have some problem.
The structure "    
        	 ...
             else if (XMLVersion == XML_VERSION_1_1)
              {
                 writeXML1_1CharacterReference(ch);
              }
	...
was intendend to sure that in case we are dealing with a XML1.1 specific character , it would be printed as a charRefs for XML1.1 output. However, for XML1.0 output those characters would be just ignored. The solution is far from being perfect, but it produced well-formed XML files. 
	Right now I'm thinking about other solution: in XalanXMLSerializerBase::s_specialChars1_0 table we can mark the forbidden characters as "eForbidden" and later just check for it. In case of the forbidden character we can throw an exception. 


> FormatterToXMLUnicode does not serialize UTF-8 correctly
> --------------------------------------------------------
>
>          Key: XALANC-532
>          URL: http://issues.apache.org/jira/browse/XALANC-532
>      Project: XalanC
>         Type: Bug
>   Components: XalanC
>     Versions: CurrentCVS
>     Reporter: David Bertoni
>     Assignee: David Bertoni
>     Priority: Critical
>  Attachments: patch.txt
>
> There are some serious bugs that result in incorrect serialization.  A patch is attached.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Updated: (XALANC-532) FormatterToXMLUnicode does not serialiez UTF-8 correctly

Posted by "David Bertoni (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANC-532?page=all ]

David Bertoni updated XALANC-532:
---------------------------------

    Attachment: patch.txt

> FormatterToXMLUnicode does not serialiez UTF-8 correctly
> --------------------------------------------------------
>
>          Key: XALANC-532
>          URL: http://issues.apache.org/jira/browse/XALANC-532
>      Project: XalanC
>         Type: Bug
>   Components: XalanC
>     Versions: CurrentCVS
>     Reporter: David Bertoni
>     Assignee: David Bertoni
>     Priority: Critical
>  Attachments: patch.txt
>
> There are some serious bugs that result in incorrect serialization.  A patch is attached.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANC-532) FormatterToXMLUnicode does not serialize UTF-8 correctly

Posted by "Dmitry Hayes (JIRA)" <xa...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XALANC-532?page=comments#action_12319086 ] 

Dmitry Hayes commented on XALANC-532:
-------------------------------------

Hi Dave ! Are we planning to do something else with the defect ? I'd suggest to close it . Thanks!

> FormatterToXMLUnicode does not serialize UTF-8 correctly
> --------------------------------------------------------
>
>          Key: XALANC-532
>          URL: http://issues.apache.org/jira/browse/XALANC-532
>      Project: XalanC
>         Type: Bug
>   Components: XalanC
>     Versions: CurrentCVS
>     Reporter: David Bertoni
>     Assignee: David Bertoni
>     Priority: Critical
>  Attachments: patch.txt, patch.txt
>
> There are some serious bugs that result in incorrect serialization.  A patch is attached.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANC-532) FormatterToXMLUnicode does not serialize UTF-8 correctly

Posted by "David Bertoni (JIRA)" <xa...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XALANC-532?page=comments#action_12315095 ] 

David Bertoni commented on XALANC-532:
--------------------------------------

I disagree that the serializers should be responsible for error detection.  It should be the responsibility of the caller to ensure the data they send is correct.  That means the serializers can be more efficient, because they need not attempt to verify the incoming data.

Look at it from the perspective of an event producer, like an XML parser.  Wouldn't a consumer of SAX events expect a parser to send proper events?  Would your application want to verify the data that came from your event producer?

> FormatterToXMLUnicode does not serialize UTF-8 correctly
> --------------------------------------------------------
>
>          Key: XALANC-532
>          URL: http://issues.apache.org/jira/browse/XALANC-532
>      Project: XalanC
>         Type: Bug
>   Components: XalanC
>     Versions: CurrentCVS
>     Reporter: David Bertoni
>     Assignee: David Bertoni
>     Priority: Critical
>  Attachments: patch.txt
>
> There are some serious bugs that result in incorrect serialization.  A patch is attached.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Closed: (XALANC-532) FormatterToXMLUnicode does not serialize UTF-8 correctly

Posted by "Dmitry Hayes (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANC-532?page=all ]
     
Dmitry Hayes closed XALANC-532:
-------------------------------

    Resolution: Won't Fix

> FormatterToXMLUnicode does not serialize UTF-8 correctly
> --------------------------------------------------------
>
>          Key: XALANC-532
>          URL: http://issues.apache.org/jira/browse/XALANC-532
>      Project: XalanC
>         Type: Bug
>   Components: XalanC
>     Versions: CurrentCVS
>     Reporter: David Bertoni
>     Assignee: David Bertoni
>     Priority: Critical
>  Attachments: patch.txt, patch.txt
>
> There are some serious bugs that result in incorrect serialization.  A patch is attached.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Updated: (XALANC-532) FormatterToXMLUnicode does not serialize UTF-8 correctly

Posted by "Dmitry Hayes (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANC-532?page=all ]

Dmitry Hayes updated XALANC-532:
--------------------------------

    Attachment: patch.txt

The patch fixes error reporting issues for the serializers and other minor fixes. The patch includes fixes from the previose patch . Please review ! Thanks!

> FormatterToXMLUnicode does not serialize UTF-8 correctly
> --------------------------------------------------------
>
>          Key: XALANC-532
>          URL: http://issues.apache.org/jira/browse/XALANC-532
>      Project: XalanC
>         Type: Bug
>   Components: XalanC
>     Versions: CurrentCVS
>     Reporter: David Bertoni
>     Assignee: David Bertoni
>     Priority: Critical
>  Attachments: patch.txt, patch.txt
>
> There are some serious bugs that result in incorrect serialization.  A patch is attached.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org