sass / ruby-sass

The original, now deprecated Ruby implementation of Sass
https://sass-lang.com
MIT License
183 stars 38 forks source link

compile_file should take an encoding option #43

Closed nex3 closed 6 years ago

nex3 commented 6 years ago

From https://github.com/sass/sass/issues/1965:

To be clear, I'm talking about input encoding, output is always utf-8.

Maybe I'm missing something, but I couldn't figure out how to define a specific encoding for input files if they lack any bom or charset declaration. Therefore ruby sass will probably apply the default encoding, which would be CP850 in my case. But I know that the file in question is utf-8, so I would expect:

Sass.compile_file(filename, :encoding => "UTF-8")

Btw. I find it quite puzzeling that it also seems impossible in ruby to open a file in utf-8 encoding with the newline conversion disabled. We have some spec tests results that contain single \r chars, which get converted to \n by ruby io if newline conversion is on. But I'm using 1.9.3, so that may already be solved (saw a writebin function in the docs). I can work around those issues, but I figured I still post this here.

nex3 commented 6 years ago

I'm closing this issue as "on ice" because Ruby Sass is deprecated and no additional features are planned for it.