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 2002/10/18 07:15:46 UTC

DO NOT REPLY [Bug 13754] New: - Wrong output 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=13754>.
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=13754

Wrong output encoding

           Summary: Wrong output encoding
           Product: XalanJ2
           Version: CurrentCVS
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: org.apache.xalan.serialize
        AssignedTo: xalan-dev@xml.apache.org
        ReportedBy: jarekl@pi.net.pl


I'm currently developing application which uses Xalan XSLT processor. I
found that serializations in my character set (iso-8859-2) does not work
properly. When I set <xsl:output encoding="iso-8859-2"> in my stylesheet, all 
extended latin2 characters are escaped in &#XXX; form, but shouldn't be. It is 
a problem when such transformeted document is used in older Netscape Navigator 
and characters are placed in VALUE attribute of <INPUT> element of HTML page. 
It also could be a problem when there are no unicode font in OS.
After some testing, I found that problem is in
org.apache.xalan.serialize.Encodings class. This class uses
java.util.Properites class to read EncodingInfo values from
Encodings.properites resource. It uses as key mime-name of encoding,
unfortunately one mime-name has many java-names, but in Properties class
only the last one is active. But the last "java-name" of encoding isn't 
implemented in my JDK (SUN j2sdk 1.4.1) :(
I decided to fix it, so I wrote patch for Encodings.java (rev. 1.11). It uses 
stream to read values from property file, and
java.util.Vector to store it.