编译sass,遇到报错error style.scss (Line 3: Invalid GBK character "\xE5")

今天学习sass,写了一行中文注释,结果却遇到了报错:

1 cmd.exe /D /C call C:/Ruby23-x64/bin/scss.bat --no-cache --update style.scss:style.css
2       error style.scss (Line 3: Invalid GBK character "\xE5")
3 
4 Process finished with exit code 1

以前在公司使用的mac没用遇到这种问题,当使用windows 7开发是遇到了这个问题。

在github中找到了答案,现在记录在这里:

在sass文件开头写上:

@charset "utf-8";

附上github链接:https://github.com/imathis/octopress/issues/232

  

原文地址:https://www.cnblogs.com/zhiyingzhou/p/5913997.html