When I call render() method I get the below error :
“can not change default encoding Cp1252 to UTF8 as specified in the source HTML: the given input stream reader does not support reset()”.
version: PD4ML 361b2
java.io.IOException: can not change default encoding Cp1252 to UTF8 as specified in the source HTML: the given input stream reader does not support reset()
at org.zefer.html.doc.PD4MLHtmlParser.parse(Unknown Source)
at org.zefer.html.doc.PD4MLHtmlParser.buildDocument(Unknown Source)
at org.zefer.pd4ml.PD4ML.super(Unknown Source)
at org.zefer.pd4ml.PD4ML.render(Unknown Source)
A good workaround would be to use render(URL,…) method instead of render(InputStream,…)
Another solution is to pre-read the source HTML into a byte array and to pass it to PD4ML.render() as a ByteArrayInputStream
Also you may run JVM with -file.encoding=UTF8 command-line parameter or to use a render() method, which accepts an encoding name as a parameter, but in the case your Java code is going to be dependent on the document content you are going to convert.
Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘General questions / FAQ’ is closed to new topics and replies.