如何在SASS(SCSS)中更改字符集

时间:2022-05-22 00:11:17

When working on web projects I'm using css preprocessor SASS with SCSS syntax. In the comments, I like to write what the following code does, I write comments in my language (in czech). Unfortunately, when you compile it throws me the error coding. I'm using for compilation app Koala.

在处理Web项目时,我正在使用带有SCSS语法的css预处理器SASS。在评论中,我喜欢写下面代码的内容,我用我的语言(捷克语)写评论。不幸的是,当你编译它时会抛出错误编码。我正在使用编译应用程序Koala。

Error msg by compilation:

编译错误消息:

 Error: Invalid US-ASCII character "\xC5" on line 7 
 of /Users/martinjinda/Documents/www/_welcome_screen/local/sass/main.scss 
 Use --trace for backtrace.

SCSS code:

 // ---------------------------------------------------------------------------
 // Import všech zdrojových souborů a následná kompilace do /css/main.css

 @import 'reset.scss';
 @import 'typo.scss';
 @import 'mixins.scss';
 @import 'layout.scss';
 @import 'content.scss';

1 个解决方案

#1


7  

Try @charset "UTF-8"; on the beginning of file, before any spaces, comments.

试试@charset“UTF-8”;在文件的开头,在任何空格之前,注释。

#1


7  

Try @charset "UTF-8"; on the beginning of file, before any spaces, comments.

试试@charset“UTF-8”;在文件的开头,在任何空格之前,注释。