今天學習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