部分编码错误 [英] Wrong encoding for partial

查看:46
本文介绍了部分编码错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Windows XP上运行罗盘监视my_project

I am running compass watch my_project on Windows XP.


  • index.scss

@charset "UTF-8";
@import 'partial';
// ...


  • _partial.scss

    p:before {
        content: '•';
    }
    


  • config.rb

    encoding = "utf-8"
    


  • 生成的 index.css

    @charset "UTF-8";
    /* line 1, ../sass/_partial.scss */
    p:before {
      content: 'ÔÇó';
    }
    // ...
    


  • 如何使Compass / Sass将部分解释为UTF-8?

    How do I make Compass/Sass interpret the partial as UTF-8? Is there perhaps an environment variable that I can set to change default character encoding used by Ruby (compass is a Ruby app)?

    推荐答案

    在Windows 7计算机上,它可以将以下行添加到项目的 config.rb

    On my Windows 7 machine, it worked to add the following line to my project's config.rb

    Encoding.default_external = 'utf-8'
    

    还为罗盘/更少/ JS压缩找到了一个不错的GUI: http://koala-app.com/

    Also found a great GUI for compass / less / JS compression: http://koala-app.com/

    这篇关于部分编码错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆