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.
From https://github.com/sass/sass/issues/1965: