Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#15236 closed defect (fixed)

Build system doesn't handle byte order markers when combining CSS files

Reported by: Scott Hunter Owned by: Rawld Gill
Priority: high Milestone: 1.8
Component: BuildSystem Version: 1.7.2
Keywords: Cc:
Blocked By: Blocking:

Description

When building and combining @imported CSS files, the build system does not strip out UTF-8 byte order marks (BOMs) when inlining files. In the resulting CSS file, the raw BOM bytes (EFBBBF) appear directly in the middle of the combined file, which alters or invalidates the first declaration in the included file.

Change History (5)

comment:1 Changed 8 years ago by Rawld Gill

Milestone: tbd1.8
Priority: undecidedhigh
Status: newassigned

comment:2 Changed 7 years ago by Rawld Gill

Resolution: fixed
Status: assignedclosed

In [29277]:

remove BOM in flattened CSS; fixes #15236; !strict

comment:3 Changed 7 years ago by bill

Hmm, seems like if you read in the file as text it should be stripped automatically, maybe the problem is that you are using importModule.rawText instead of importModule.text. (I also wonder if that's causing other problems like CR-LF issues on Windows.)

comment:4 in reply to:  3 Changed 7 years ago by Rawld Gill

Replying to bill:

Hmm, seems like if you read in the file as text it should be stripped automatically,

You would think. Unfortunately, this seems to be a sporadic problem with node.

maybe the problem is that you are using importModule.rawText instead of importModule.text. (I also wonder if that's causing other problems like CR-LF issues on Windows.)

I don't understand your observation: when a file is flattened, the original text is copied to rawText and text is set to the processed version.

comment:5 Changed 7 years ago by bill

Oh OK, I was guessing (apparently incorrectly) that rawText and text were creating by the Node file library, not by your code.

Note: See TracTickets for help on using tickets.