Why does lessc encode files as UCS-2 Little Endian?

On a Windows platform with Node, the following command is executed

lessc style.less > style.css -x --yui-compress

Displays the style.css file in the format "UCS-2 Little Endian". Usually I didn't care, but I noticed that my compiled styles had huge file sizes (exactly twice, after checking). For some reason, this encoding doubles the file size when viewed in Windows Explorer.

Converting files to UTF8 halves the file size. Skipping -x and -yui-compress does not affect this.

Any ideas? I care because I don’t want to work with some kind of coding converter into my build process.

+4
source share
1 answer

try to avoid using> and just specify 2 arguments to enter and exit. When using piping (>), I assume that the environment determines the format of the text.

eg.

 lessc -x --yui-compress style.less style.css 
+3
source

Source: https://habr.com/ru/post/1434647/


All Articles