grunt-contribass:不兼容的字符编码:UTF-8和CP850 [英] grunt-contrib-sass: incompatible character encodings: UTF-8 and CP850
问题描述
在尝试使用grunt将我的sass文件转换为正常的css文件时,我收到警告:
警告: :CompabilityError:不兼容的字符编码:UTF-8和CP850。然而,当我运行sass调用文件时,一切都工作,因为它应该,即使没有编码是由我指定。我的 Gruntfile.js
看起来像这样:
sass:{
main:{
file:{
'css / theme / default.css':'css / theme / source / default.scss',
'css / theme / beige.css':'css / theme / source / beige.scss',
'css / theme / night.css':'css / theme / source / night.scss',
'css / theme / serif.css':'css / theme / source / serif.scss',
'css / theme / simple.css':'css / theme / source / simple.scss' ,
'css / theme / sky.css':'css / theme / source / sky.scss',
'css / theme / moon.css':'css / theme / source / moon。 scss',
'css / theme / solarized.css':'css / theme / source / solarized.scss',
}
}
}
[。 ..]
这是 Gruntfile.js
我从GitHub上的reveal.js分支。我查看了GitHub上的 grunt-contribassa ,并尝试找到选项以更改编码手动。但是它似乎没有(也许我只是忽略了它?)。
我认为一个keypart的问题是,我使用Windows 8,而不是任何基于Unix的操作系统。
所以我的问题是:
我摆脱这个警告?或者我如何修复代码以正常工作?
解决方案尝试使用命令时出现此错误:
sass --watch global.scss:global.css --style compressed
原因是最愚蠢的原因...我有这个文件夹: E:\Dropbox [Websites] [External]FundaciónGlobal\css ,我在那里运行命令,SASS返回了同样的错误:警告:Encoding :: CompabilityError:不兼容的字符编码:UTF-8和CP850。
我只需要从文件夹的路径中取出ó!
这简单而愚蠢!刚刚更改了这一点: ... Fundacion Global \ css 为此 ... Fundacion Global\css ,我已经SASS观看了,没有任何问题。
While trying to use grunt to convert my sass files into normal css files i get the warning:
Warning: Encoding::CompabilityError: incompatible character encodings: UTF-8 and CP850.
However when I run sass calling the file(s) everything works as it should even though no encoding is specified by me. My Gruntfile.js
looks like this:
[...]
sass: {
main: {
files: {
'css/theme/default.css': 'css/theme/source/default.scss',
'css/theme/beige.css': 'css/theme/source/beige.scss',
'css/theme/night.css': 'css/theme/source/night.scss',
'css/theme/serif.css': 'css/theme/source/serif.scss',
'css/theme/simple.css': 'css/theme/source/simple.scss',
'css/theme/sky.css': 'css/theme/source/sky.scss',
'css/theme/moon.css': 'css/theme/source/moon.scss',
'css/theme/solarized.css': 'css/theme/source/solarized.scss',
}
}
}
[...]
which is a part of the Gruntfile.js
I forked from the reveal.js on GitHub. I took a look at the grunt-contrib-sass on GitHub and tried to find the option to change the encoding manualy. However it apears that there is none (maybe I just overlooked it?).
I think a keypart of the problem is that I am using Windows 8 and not any Unix based OS.
So my question is:
How do i get rid of this warning? Or how do i fix the code to work properly?
Any help is appreciated.
解决方案 I had this error when trying to use the command:
sass --watch global.scss:global.css --style compressed
And the cause was the most stupid cause ever... I had this folder: E:\Dropbox[Websites][External] Fundación Global\css and I run the command in there, and SASS returned this same error: Warning: Encoding::CompabilityError: incompatible character encodings: UTF-8 and CP850.
I just needed to take out the ó from the folder's path!
That simple and silly! Just changed this: ...Fundación Global\css for this ...Fundacion Global\css and I have SASS watching with no issues again.
这篇关于grunt-contribass:不兼容的字符编码:UTF-8和CP850的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!