You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2001/10/05 20:07:49 UTC

DO NOT REPLY [Bug 4000] New: - class CharInfo - Loading of entities file assumes default platform encoding

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=4000>.
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=4000

class CharInfo - Loading of entities file assumes default platform encoding

           Summary: class CharInfo - Loading of entities file assumes
                    default platform encoding
           Product: XalanJ2
           Version: 2.2.x
          Platform: Other
        OS/Version: Other
            Status: UNCONFIRMED
          Severity: Normal
          Priority: Other
         Component: org.apache.xalan.serialize
        AssignedTo: xalan-dev@xml.apache.org
        ReportedBy: ishabtay@netvision.net.il
                CC: ishabtay@netvision.net.il


org.apache.xalan.serialize.CharInfo, line 159:

      reader = new BufferedReader(new InputStreamReader(is));

This bug reports sounds like a continuation to the ongoing discussion about bug 
#2291; yet, here we're not talking about any probably-standardized file type.

XMLEntities.res, HTMLEntities.res etc. are simple text files, encoded in ASCII. 
Using the above line to construct a bufferred reader to read this file, causes 
garbage to be read in non-ASCII platforms.

No standard is set on "user supplied" text files inside JAR files. Therefore, 
we cannot depend on the platform-specific encoding. If this file is released 
from Apache as ASCII, then CharInfo must explicitly treat it as an ASCII file.

This line should be changed to:

reader = new BufferedReader(new InputStreamReader(is,"ISO8859-1"));


   - Isaac