users@glassfish.java.net

Re: FODC0002: java.io.UTFDataFormatException: Invalid byte 1 of 1-byte UTF-8

From: <glassfish_at_javadesktop.org>
Date: Sun, 15 Aug 2010 19:23:00 PDT

Hi All,

Changing to InputStreamReader which allows one to specify the encoding such as the following didn't help either:

            FileInputStream stylesheet = new FileInputStream("C:/stylesheet.xsl");
            InputStreamReader styleSheetISR = new InputStreamReader(styleSheetIS,"UTF-8");
            Transformer transformer = transformerFactory.newTransformer(new StreamSource(styleSheetISR));

So the container does not have problem reading the stylesheet but the additional xml documents using document() within the XSLT 2.0 (Saxon 9.1) stylesheet.

Thanks,

Jack
[Message sent by forum member 'htran_888']

http://forums.java.net/jive/thread.jspa?messageID=480256