Home >Web Front-end >JS Tutorial >How to solve the problem of Chinese errors in webstrom sass comments

How to solve the problem of Chinese errors in webstrom sass comments

一个新手
一个新手Original
2017-09-27 09:50:161794browse


I recently used webStrom to write sass. It feels very easy to use and it automatically compiles it for you. However, there is a problem. When writing Chinese comments, an error will occur.

is as follows:

I checked online and it said that adding:

@charset "utf-8";

to the head of the scss file. However, I tried it and it didn’t matter. use! ! ��

After some searching, I finally found the method, record it here:

① Add:

@charset "utf-8";

② Open / Library/Ruby/Gems/2.0.0/gems/sass-3.4.22/lib/sass/engine.rb(mac)

Add after require:

Encoding.default_external = Encoding.find('utf-8')

as follows:

The above is the detailed content of How to solve the problem of Chinese errors in webstrom sass comments. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn