Return-Path: Delivered-To: apmail-xml-xalan-j-users-archive@xml.apache.org Received: (qmail 47762 invoked by uid 500); 8 Oct 2002 09:03:40 -0000 Mailing-List: contact xalan-j-users-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list xalan-j-users@xml.apache.org Received: (qmail 47754 invoked from network); 8 Oct 2002 09:03:40 -0000 Received: from moutvdom.kundenserver.de (195.20.224.130) by daedalus.apache.org with SMTP; 8 Oct 2002 09:03:40 -0000 Received: from [212.227.126.181] (helo=mrvdomng.kundenserver.de) by moutvdom.kundenserver.de with esmtp (Exim 3.35 #1) id 17yqHQ-0005qu-00 for xalan-j-users@xml.apache.org; Tue, 08 Oct 2002 11:03:52 +0200 Received: from [195.243.151.195] (helo=KA_SRV_015.ap-ag.com) by mrvdomng.kundenserver.de with esmtp (Exim 3.35 #1) id 17yqHQ-000146-00 for xalan-j-users@xml.apache.org; Tue, 08 Oct 2002 11:03:52 +0200 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: Transformer uses correct encoding, but does not write UTF-8 marker intofile X-MimeOLE: Produced By Microsoft Exchange V6.0.5762.3 Date: Tue, 8 Oct 2002 11:03:52 +0200 Message-ID: <35E42ABE2AC11942B718D90FCCE11256AF3B62@KA_SRV_015.ap-ag.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Transformer uses correct encoding, but does not write UTF-8 marker intofile Thread-Index: AcJj5EfMFhAqj3xsQOSg+68aydkK3gKxUQMw From: =?iso-8859-1?Q?Thomas_B=F6rkel?= To: "Xalan Mailinglist" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Status: O X-Status: X-Keywords: HI! It's Notepad from Windows 2000. Regards, Thomas > -----Original Message----- > From: David N Bertoni/Cambridge/IBM=20 > [mailto:david_n_bertoni@us.ibm.com]=20 > Sent: Dienstag, 24. September 2002 17:45 > To: xalan-j-users@xml.apache.org > Subject: Re: Transformer uses correct encoding, but does not=20 > write UTF-8 marker intofile >=20 >=20 >=20 >=20 >=20 >=20 >=20 > There is no real need for a UTF-8 BOM, so most XML processing=20 > systems don't > write one. What software are you using that requires one? >=20 > Dave >=20 >=20 >=20 > =20 > =20 > =20 > Thomas B=F6rkel =20 > =20 > =20 > To: =20 > "Xalan Mailinglist" =20 > =20 > cc: (bcc:=20 > David N Bertoni/Cambridge/IBM) =20 > =20 > 09/24/2002 01:18 Subject:=20 > Transformer uses correct encoding, but does not write UTF-8=20 > marker into file =20 > AM =20 > =20 > =20 > =20 > =20 > =20 > =20 > =20 > =20 >=20 >=20 >=20 > HI! >=20 > I am writing an XML DOM to a file, using UTF-8 encoding. The=20 > encoding is > OK, the XML declaration is there, but the leading UTF-8=20 > markers are missing > in the file. Is this a bug or how can this be achieved? Thanks! >=20 > This is the code: >=20 > TransformerFactory tFactory; > Transformer transformer; > StreamResult streamResult; >=20 > tFactory =3D TransformerFactory.newInstance(); > transformer =3D tFactory.newTransformer(); > transformer.setOutputProperty(OutputKeys.ENCODING, encoding); > streamResult =3D new StreamResult(file); > transformer.transform(new DOMSource(node), streamResult); >=20 >=20 > Regards, > Thomas >=20 >=20 >=20 >=20 >=20