Hi,
I have a problem with the java DXLExporter.
The created DXL-Files are not encoded with UTF-8 (looks like iso-8859-1).
The problem is, that the exporter doesn’t create an encoding-attribute and that’s a problem for all XML-parsers I use, because without these attribute he thinks the dxl is encoded in UTF-8.
Is there a way, that the exporter creates the encoding-attribute or export the document in UTF-8?
Here is an example-code:
public class JavaAgent extends AgentBase
{
public void NotesMain()
{
try
{
Session session = getSession();
AgentContext agentContext = session.getAgentContext();
Document doc = agentContext.getDocumentContext();
String filename = "d:\\exporteddb.dxl";
Stream stream = session.createStream();
if (stream.open(filename))
{
stream.truncate();
DxlExporter exporter = session.createDxlExporter();
exporter.setDoctypeSYSTEM(null);
exporter.setConvertNotesBitmapsToGIF(true);
//i need something like this:
//exporter.setOutputEncoding("UTF-8");
stream.writeText(exporter.exportDxl(doc));
}
else
System.out.println("Cannot open " + filename);
} catch(Exception e) {e.printStackTrace();}
}
}