Closed shwaka closed 4 years ago
Set appropriate encoding for the string @source_map of Engine, similarly to that of the string css in Engine#render.
@source_map
Engine
css
Engine#render
This PR will fix the error in the last line of the following code:
# coding: utf-8 require "sassc" template = <<EOS body { // 赤 color: red; } EOS options = { :source_map_file => "foo.css.map", :source_map_contents => true } engine = SassC::Engine.new(template, options) engine.render source_map = engine.source_map puts source_map # includes non-ASCII character "赤" puts source_map.encoding # => ASCII-8BIT (UTF-8 is expected) source_map.encode("UTF-8") # throws Encoding::UndefinedConversionError
Set appropriate encoding for the string
@source_map
ofEngine
, similarly to that of the stringcss
inEngine#render
.This PR will fix the error in the last line of the following code: