Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Charset error, invalid character #84

Closed
cadje opened this issue Jun 25, 2015 · 13 comments
Closed

Charset error, invalid character #84

cadje opened this issue Jun 25, 2015 · 13 comments

Comments

@cadje
Copy link

cadje commented Jun 25, 2015

As the main SCSS file (include-media/dist/_include-media.scss) uses and chars, there's the following error arising:

Invalid US-ASCII character "\xE2"

Please add @charset "UTF-8"; as first line in those files to avoid such errors with SCSS.

Thanks in advance!

@cadje cadje changed the title Charset error, invalid charcter Charset error, invalid character Jun 25, 2015
@KittyGiraudel
Copy link
Collaborator

How of curiosity, which compiler do you use?

@KittyGiraudel
Copy link
Collaborator

Done in #86. Please review @eduardoboucas.

@eduardoboucas
Copy link
Owner

Merged! Thanks guys.

@asifshirazi
Copy link

Sorry but I'm still facing this issue after updating the file :(

(Line 262 of /private/src/sass/_include-media.scss: Invalid US-ASCII character "\xE2")

SASS and Compass gems also updated.

@prisis
Copy link
Contributor

prisis commented Aug 27, 2015

Try to add in your config.rb

Encoding.default_external = 'utf-8'

Because it should work.

@asifshirazi
Copy link

It works! Thank you so much @prisis :)

@prisis
Copy link
Contributor

prisis commented Aug 27, 2015

Your welcome :)

The best solution is to add ´´´´@charset "UTF-8";´´´´ on top of all your scss/sass files. Because sometimes Ruby dont use UTF-8 as default.

@raphaelriehl
Copy link

Hello,
I have the same problem when i compile with assetic in Symfony 2.8.
In my case, i replace
@charset 'UTF-8';
by
@charset "UTF-8";
And it works fine with this solution.

If it's not conflict source, could you replace the simple quote by double quotes in the charset like the first comment ?
Thanks in advance ! :)

@eduardoboucas eduardoboucas reopened this Jun 20, 2016
@KittyGiraudel
Copy link
Collaborator

Feel free to submit a PR. :)

@KittyGiraudel
Copy link
Collaborator

Done with d96611c and 8abc8b9.

@chillybin
Copy link

Getting this error when trying to compile on macOS Sierra in Grunt

Running "sass:build" (sass) task
Error: Invalid US-ASCII character "\xE2"
        on line 263 of bower_components/include-media/dist/_include-media.scss
        from line 5 of sass/style.scss
  Use --trace for backtrace.
Warning: Exited with error code 65 Use --force to continue.

Aborted due to warnings.

Process finished with exit code 6

@eduardoboucas
Copy link
Owner

Can you confirm you're using the latest version (1.4.8) of include-media?

@chillybin
Copy link

chillybin commented Sep 13, 2016

Yes that's correct. The version of 1.4.8 that I have only has @charset 'UTF-8'; and not the double quotes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants