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

Unicode/utf-8 issues #8

Closed
Untit1ed opened this issue Sep 19, 2013 · 6 comments
Closed

Unicode/utf-8 issues #8

Untit1ed opened this issue Sep 19, 2013 · 6 comments

Comments

@Untit1ed
Copy link

In my styles I have something like .class{content: ' ✗ ';} after scss -> css conversion I get .class{content: ' ✗ ';}.
I tried to specify encoding in my main scss file by using @charset "UTF-8";, but it seems to be ignored and I don't see it in result css file.

@darrenkopp
Copy link
Owner

Looks like libsass has problems with unicode... Until libsass supports it (or I end up writing a compiler), I would say the only work around is to just use the unicode escape syntax like \uXXXX

sass/libsass#25
sass/libsass#160

@Untit1ed
Copy link
Author

Thanks @darrenkopp , it's weird though, I thought @charset was supposed to fix it.

http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#encodings

@darrenkopp
Copy link
Owner

yeah, that second libsass issue is about @charset being ignored

@darrenkopp
Copy link
Owner

@Untit1ed give me a few days to think about this, but I think perhaps I could easily pre-parse the scss file and replace any non-ansi characters w/ the \uXXXX replacement value and then feed that into libsass. I'm always a bit fuzzy when it comes to encoding so I'm not exactly sure if I can or not, but I'll definitely try.

@Untit1ed
Copy link
Author

@darrenkopp, thanks for your help. It's not a big deal, unicode codes fix the issue for me, I just thought SassyStudio was ignoring @charsets.

@HerbCaudill
Copy link

Just ran into this issue. +1 for the idea of pre-parsing.

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

3 participants