Encoding issue with code literals (again)
I have an encoding issue with different implementations of libsass. For example, writing:
$var: "\f045";
.c1 { content: $var; }
.c2 { content: "\f045"; }
And I get:
@charset "UTF-8";
.c1 { content: ""; }
.c2 { content: "\f045"; }
So it seems that this problem appears when using variables. It is very similar to other issues (1, 2, 3, 4) already solved.
I tried with different implementations: libsass-maven-plugin, jsass and node-sass.
This is the way how ruby sass does it, and libsass tries to mimic ruby sass behavior whenever possible. The .c2 case is not changed to a unicode code-point because it's a static optimization by ruby sass (input is keept untouched). If you think this is a bug, please open an issue on upstream ruby sass directly. I think there is already a similar ticket open to get rid of the static optimization, since it also complicates other cases (like trailing semicolons etc.).
$var: "\f045";
.c1 { content: $var; }
.c2 { content: "\f045"; }
.c3 { content: ("\f045"); }
@charset "UTF-8";
.c1 { content: ""; }
.c2 { content: "\f045"; }
.c3 { content: ""; }
@mgreter: You are right, it's how Sass works. In fact, this is a bug of the library I'm using: https://github.com/FortAwesome/Font-Awesome/issues/10842