question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem with output "@charset 'utf-8';" to CSS

See original GitHub issue

Example:

main.scss:

@charset 'utf-8';

body {
    color: #333;
}

compile to:

body {color:#333}

where is string “@charset ‘utf-8’;” ?

My setup: MacOSX 10.9.3 / Ruby 2.1.2 (Rbenv) / SASS 3.3.7.

Thank you!

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

10reactions
barchancommented, May 19, 2014

looks like its not a problem, example: http://sassmeister.com/gist/9537678

if any html-character present in any *.scss file, even like comment, SASS automaticly adding ‘@charset “UTF-8”;’ in compiled .css file.

4reactions
nex3commented, May 19, 2014

Sass will only include a @charset declaration in the CSS output if there are any non-ASCII characters. CSS is parsed as ASCII by default, so it’s unnecessary if the stylesheet is pure ASCII.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CSS won't load with UTF-8 encoding
@charset "UTF-8";. use UTF-8 in eclipse as encoding before exporting to WAR. The CSS does not get loaded although it is referencable via ......
Read more >
Declaring character encodings in CSS
Quick answer​​ In this case you should use @charset or HTTP headers to declare the encoding. (If your HTML and CSS files use...
Read more >
charset - CSS: Cascading Style Sheets - MDN Web Docs
The @charset CSS at-rule specifies the character encoding used in the style sheet ... Invalid, wrong quoting style used */ @charset "UTF-8"; ...
Read more >
Statically typed URL creation, fix CSS intermittent encoding ...
So, the problem here was a charset issue because browsers can handle different charsets if you put the information at the top of...
Read more >
specifying @charset in CSS bundle - MSDN - Microsoft
Therefore @charset "UTF-8" is midway through my single bundled CSS file ... with @charset "UTF-8"; doesn't feel right, but I may be wrong....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found