Hi, all. This time I tried myself what I suggested to Marcel - but it does not work. Whatever I set the encoding to, the output is UTF-8. I also included the line that made no sense in my eyes - with no effect. Marcel, did my solution help you?
If not, we have a problem with the marshalling framework. I tried to understand Marshaller.java but could not find the lines where Xerces Serializers are called with the correct/wrong encoding. Can anyone help me on that? Hiran > -----Original Message----- > From: Chaudhuri, Hiran [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 26, 2003 2:15 PM > To: [EMAIL PROTECTED] > Subject: Re: [castor-dev] Encoding Problem > > > Hi, Marcel. > > That's what I had suspected some time ago. What about this approach: > > FileOutputStream os=new FileOutputStream(new > File("D:\\Temp\\xmlModel.xml")); > Writer fw = new OutputStreamWriter(os, > "iso-8859-1"); > fw.write("<?xml version=\"1.0\" > encoding=\"iso-8859-1\"?>\n"); > Marshaller ms=new Marshaller(fw); > //ms.setEncoding("ISO-8859-1"); in my eyes this > lines has no effect > ms.marshal(model,fw); > fw.close(); > os.close(); > > Hiran > > > > -----Original Message----- > > From: Marcel Flueckiger [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, March 26, 2003 1:37 PM > > To: [EMAIL PROTECTED] > > Subject: [castor-dev] Encoding Problem > > > > > > I have problems with the encoding Tag in my generated XML > > field. I need do declare "ISO-8859-1" instead of utf-8. > > i tryed to change the encoding the following way , but it > > doesnt work... > > FileWriter fw=new FileWriter(new > > File("D:\\Temp\\xmlModel.xml")); > > Marshaller ms=new Marshaller(fw); > > ms.setEncoding("ISO-8859-1"); > > ms.marshal(model,fw); > > fw.close(); > > But in the generated XML File ist the Encoding still set with UTF-8 > > Can you help me pleas ... > > Thanks Marcel Flueckiger > > > > ----------------------------------------------------------- > > If you wish to unsubscribe from this mailing, send mail to > > [EMAIL PROTECTED] with a subject of: > > unsubscribe castor-dev > > > > ----------------------------------------------------------- > If you wish to unsubscribe from this mailing, send mail to > [EMAIL PROTECTED] with a subject of: > unsubscribe castor-dev > ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
