Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6513892

redirect encodes output file using the platform's default charset

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 6
    • xml
    • 1.4
    • x86
    • windows_xp
    • Verified

        FULL PRODUCT VERSION :
        jdk 1.6.0

        ADDITIONAL OS VERSION INFORMATION :
        MS XP Version 5.1.2600

        A DESCRIPTION OF THE PROBLEM :
        redirect encodes output file using the platform's default charset. The file enctest2.txt is not UTF-8 encoded.


        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        use this xslt with any xml.
        <xsl:output method="html" indent="no" encoding="UTF-8"/>
        <xsl:template match="/">
            <xsl:text disable-output-escaping="yes">Euro 1: € </xsl:text>
            <redirect:write encoding="UTF-8" file="enctest2.txt">
                <xsl:text disable-output-escaping="yes">Euro 2: € </xsl:text>
            </redirect:write>
        </xsl:template>

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        enctest2.txt should be UTF-8 encoded.
        ACTUAL -
        enctest2.txt is encoded using platform's default charset (windows 1252)

        REPRODUCIBILITY :
        This bug can be reproduced always.

              spericas Santiago Pericasgeertsen
              ndcosta Nelson Dcosta (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: