I have raised a patch to bring the text output method into line with the xml output method: see
 
https://sourceforge.net/tracker/?func=detail&aid=2775998&group_id=29872&atid=397617
 
Michael Kay
http://www.saxonica.com/


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

Hi,

I am trying to use the Saxon Extensions feature to output a byte order mark in text files generated with Saxon (9.1.0.6J). 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!

Stas