DXLExporter encoding missing

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();}

}

}

Subject: RE: DXLExporter encoding missing

When I try it in 8.5.1, I see <?xml version='1.0' encoding='utf-8'?>
at the beginning of the data. I don’t think anything has changed here anytime recently, and I’m sure utf-8 has always been the output character set. I suspect your breakdown is occurring later in the process.

Subject: RE: DXLExporter encoding missing

Okay, this is really strange.

I’m using the example java-agent from the domino designer help and the output-file is not encoded in utf-8 and there is no encoding-attribute.

But a Lotus-Script-Agent exports the document with UTF-8 and encoding-attribute. I don’t understand where the difference is.