You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2002/01/24 16:32:57 UTC

DO NOT REPLY [Bug 6008] New: - encoding assignment error in TreeView sample

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6008>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6008

encoding assignment error in TreeView sample

           Summary: encoding assignment error in TreeView sample
           Product: Xerces2-J
           Version: 2.0.0 [beta 4]
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Other
        AssignedTo: xerces-j-dev@xml.apache.org
        ReportedBy: joerg.vogel@dlr.de


(1) In samples/ui/DOMParserSaveEncoding.java
   String _mimeEncoding = "UTF8";
should be changed to
   String _mimeEncoding = "UTF-8";
as the variable means a IANA encoding value.

(2) Some lines further down
   } else   // Should never return null
       javaEncoding = "UTF8";
should be changed to
   }
   if(javaEncoding == null) // Should never return null
       javaEncoding = "UTF8";
Otherwise the function will return "null",
if the call to EncodingMap.getIANA2JavaMapping(..) two lines
above returns "null".
The wrong default mimetype (see above) actually causes exactly this
problem.
Regards Joerg

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