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

Bug: character encoding #468

Closed
collimarco opened this issue Aug 2, 2012 · 5 comments
Closed

Bug: character encoding #468

collimarco opened this issue Aug 2, 2012 · 5 comments
Labels
bug Something isn't working needs info Blocked on user response

Comments

@collimarco
Copy link

I am working with Sass 3.1.20 (Brainy Betty) and Rails 3.2.6.

I have a mixin with an em dash:

@mixin test {
  &:before {
    content: " — ";
  }
}

I use it as follows in another file:

@import 'mixins';
ul li {
  @include test;
}

I got something like â€", while everything works when I use:

ul li {
  &:before {
    content: " — ";
  }
}

UPDATE:
@nex3 Those solutions doesn't work. (but I cannot reopen because I don't have permission...)

@mguth
Copy link

mguth commented Aug 3, 2012

Same problem here, started to surface after upgrading to Sass 3.2.

p
    margin: 0
    &:before
      content: ""

outputs “

@nex3
Copy link
Contributor

nex3 commented Aug 3, 2012

This sort of thing depends heavily on your system configuration. If you're using Rails, make sure that Encoding.default_external is set to the encoding you use in your Sass files; if you're using Sass from the command line, make sure that your system encoding configuration is set appropriately. You can also use the @charset directive at the top of your Sass file to manually declare what encoding you're using.

If neither of those solutions work, feel free to re-open this.

@nex3 nex3 closed this as completed Aug 3, 2012
@tobiasmuecksch
Copy link

@nex3 Hey there. I'm on sass 3.1.20 and I've got this problem on my mac too. I tried to set @charset "UTF-8"; at the top of my Sass files, as my editor saves all files in UTF-8, but it didn't make any difference.

By the way: collimarco said this already 2 years ago (by editing his issues). As far as I can tell we are not able to reopen the issue as you suggested.

@nex3
Copy link
Contributor

nex3 commented Feb 27, 2014

Sass 3.1.20 is very old; the first thing to do is update to the most recent version (3.2.14).

If that doesn't work, run ruby -e "p Encoding.default_external" and let me know what that prints. Also, please provide minimal examples of files that demonstrate the issue, as well as the output you're getting.

@nex3 nex3 reopened this Feb 27, 2014
@nex3 nex3 added Bug labels Feb 27, 2014
@tobiasmuecksch
Copy link

@nex3 Thanks for your advice. I'm sorry i caused you to reopen this issue. It wasn't an encoding problem in my case. I've opened another issue #1141 describing my problem. Thanks anyway. Feel free to delete my obsolete comments in this issue.

@nex3 nex3 closed this as completed Feb 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs info Blocked on user response
Projects
None yet
Development

No branches or pull requests

4 participants