From 9fd5f367e8f621c24886fa12207957f25b9559ee Mon Sep 17 00:00:00 2001 From: Reuben Thomas Date: Fri, 26 Jan 2018 21:02:31 +0000 Subject: [PATCH] html.c: add explanation to FIXME MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Outputting a BOM into HTML is marked “experimental”. Since there are situations in which a BOM should not be output, this seems right. Needs further evaluation. --- src/html.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/html.c b/src/html.c index 09b9d93..d2a026d 100644 --- a/src/html.c +++ b/src/html.c @@ -706,6 +706,12 @@ transform_html_ucs2 (RECODE_SUBTASK subtask) if (input_char != EOF) put_ucs2 (BYTE_ORDER_MARK, subtask); /* FIXME: experimental */ + /* According to RFC 2718 and the Unicode Standard, if you declare the + character encoding of your page using HTTP as either "UTF-16LE" or + "UTF-16BE" then you should not use a byte-order mark at the beginning + of the page. Only if the page is labelled in HTTP using IANA charset + name "UTF-16" is a byte-order mark appropriate. */ + while (input_char != EOF) if (input_char == '&') -- 2.50.0