Opened 12 years ago

Closed 3 years ago

Last modified 3 years ago

#4661 closed enhancement (patchwelcome)

should BOM be included in build output, resource files?

Reported by: Adam Peller Owned by: Adam Peller
Priority: low Milestone: 1.13
Component: BuildTools Version: 0.9
Keywords: unicode bom i18n needsreview Cc: James Burke
Blocked By: Blocking:

Description (last modified by Adam Peller)

If all supported browsers support the Unicode Byte Order Mark (BOM) then we should consider putting it at the top of our build output. This may make UTf-8 more explicit on the page and reduce problems for the user.

A separate issue -- if all the necessary tools support the BOM (#1660, #2440), should we use it in generated dojo.cldr files and any other non-ASCII files, like nls resources?

Change History (10)

comment:1 Changed 12 years ago by Adam Peller

Cc: James Burke added
Owner: changed from James Burke to Adam Peller

comment:2 Changed 11 years ago by dante

(In [11125]) refs #4661 - minor doc changes in html.js (can't start a line with 'returns') and adds in more verbose "description" vs "summary" in a few places.

comment:3 Changed 11 years ago by Adam Peller

Milestone: 1.2

comment:4 Changed 11 years ago by Adam Peller

(In [14370]) add BOM to beginning of generated files. Refs #4661

comment:5 Changed 11 years ago by Adam Peller

(In [14427]) put byte-order-mark on the correct element. Refs #4661, corrects [14370]

comment:6 Changed 11 years ago by Adam Peller

(In [14428]) put byte-order-mark on the correct element. Refs #4661, corrects [14427]

comment:7 Changed 11 years ago by Adam Peller

Description: modified (diff)
Milestone: 1.2future

deferring this one again. Saxon doesn't seem to be outputting a BOM as advertised, and the output gets run through additional scripts of ours (like arrayLocale.js) which also need to preserve the DOM, and I'm having trouble getting JavaScript? (Rhino) + Java OutputStreams? to comply with that also.

comment:8 Changed 7 years ago by ben hockey

Keywords: needsreview added
Priority: highlow

comment:9 Changed 3 years ago by dylan

Milestone: future1.12
Resolution: patchwelcome
Status: newclosed

Given that no one has shown interest in creating a patch in the past 7 years, I'm closing this as patchwelcome.

comment:10 Changed 3 years ago by bill

I wouldn't even welcome a patch. Things seems to be working well enough as-is, and adding a BOM could destabilize them.

Also, according to https://www.rfc-editor.org/rfc/rfc7159.txt:

Implementations MUST NOT add a byte order mark to the beginning of a JSON text.


So one could argue that for consistency we shouldn't do it for other files either (JS, CSS, HTML, etc.)

Note: See TracTickets for help on using tickets.