-
Notifications
You must be signed in to change notification settings - Fork 17
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
Encoding issue on Windows #13
Comments
It seems to be a Working with |
After a bit more investigation, this seems to be originated by the way JNA converts strings: https://jna.java.net/javadoc/overview-summary.html#strings. From there: This would explain why it works in Linux and not on Windows. However, I called There is a related question on StackOverflow: http://stackoverflow.com/questions/35871861/jna-result-character-encoding-result-in-utf8, which was ultimately solved by calling another API method that returned wide chars, not available in the case of |
I was looking into this issue already. I can confirm that it seems to be an encoding issue. I think this issue is occurring when writing the output CSS to a file. (When debugging, I can see that the compiled string is consistent with the output from my OS X results.) |
Hi @irundaia! Are you using OS X then? I don't know that OS X default encoding is, does the issue happen there? I can confirm that it doesn't happen on Linux. I was following the JNA path... If JNA is the issue, then I think this could be solved by receiving the CSS output as a What do you think? |
Or, if it is an issue when saving the file, it's just a matter of specifying UTF-8 character encoding in https://github.com/irundaia/sbt-sassify/blob/master/src/org/irundaia/sass/SassCompiler.scala#L69. |
Yup I've tested it on both OS X and Linux. Now, the issue does not lie with the interface between JNA and the scala/java code but in the way I wrote the output to the destination file. I converted the If I instead use In any case! thanks a bunch for the report! |
Ah, great! Thank you very much for fixing it. Sorry if I overwhelmed you with "off the track" info. |
Yup, it's the latter issue. I've tested it on both Linux and OS X, it seems to work there as well. I'm a bit worried though, that this is OS (perhaps even FS) dependant. In any case, I'll release the fix as it is. I hope this solves your issues. If not, please let me know. |
Thank you! I confirmed that the issue is fixed for me. |
Great, thanks! |
https://gist.github.com/rpiaggio/1e08ae305a14253da97b
In the Gist above, with expected output (produced by http://www.sassmeister.com/) line 19 shows correct UTF-8 character.
When running
sbt-sassify
on Linux, this works correctly.However, when running it on Windows, that line is output as
.fa-linkedin:before{content:"?"}
with an actual question mark (HEX 3F) in the file.I'm not sure this is a
sbt-sassify
issue or an internallibsass
issue.Thank you! (and thank you for
sbt-sassify
)The text was updated successfully, but these errors were encountered: