PD4ML v4 Forums PD4ML v3 Archived Forums (Read Only) General questions / FAQ can not change default encoding Cp1252 to UTF8 as specified Re: Re: can not change default encoding Cp1252 to UTF8 as specified

#28560

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.