I have raised a patch to bring the text output method into line with the xml output method: see
Michael Kay

From: Stanislav Okhvat [mailto:stasokhvat@gmail.com]
Sent: 18 April 2009 17:58
To: saxon-help@lists.sourceforge.net
Subject: [saxon] Adding byte order mark to text files


I am trying to use the Saxon Extensions feature to output a byte order mark in text files generated with Saxon ( The encoding is UTF-16LE since I need the file as input to a program which can only understand Windows Notepad-type Unicode files (byte order mark FF+FE). This is the header of my XSLT stylesheet:

<xsl:stylesheet version="1.0" xmlns:saxon="http://saxon.sf.net/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" encoding="UTF-16LE" saxon:byte-order-mark="yes"/>

However, no byte order mark is inserted in the file. Any ideas?

Thanks a lot!