-
Notifications
You must be signed in to change notification settings - Fork 54
-
Notifications
You must be signed in to change notification settings - Fork 54
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
Errors on non-breaking space #72
Comments
Hmmm, this is because the Basically, libsass uses filesystem encoding and you have a file on your filesystem which doesn't match :)
EDIT: you can probably track down the specific file by using:
|
I am still unable to track down the file, but I may have found the source of the error: if s:
v = v.decode('UTF-8')
mkdirp(os.path.dirname(output_filename))
with open(output_filename, 'w') as output_file:
output_file.write(v) The file contents are being decoded from bytes to a UTF-8 string, but then are being written to file using the OS's default encoding (in our case, cp1252). Editing the
Seems to fix the problem. |
That'll only work in python3 (and will ignore the OS encoding). Feels like a good thing to respect the OS's encoding though? If we want to fix this in the way described above, the 2+3 solution is to use the open function from the |
I believe the CSS spec says output is always supposed to be UTF-8 encoded.
Interestingly, the duplicate code in |
OK, I just hit this bug again so I decided to do some digging and find the root of the error. As it would turn out out, I have this file that uses
I checked the spec, it is supposed to respect the file's encoding, not the OS's. However, as of 3.4.0 even Sass only outputs UTF-8 encoded CSS because they too hit encoding issues. Honestly, I still think the best fix here is to If you would like, I can put up a PR to apply the fix. |
seems fine to me, +1 for |
I've yet to track down the source file, but compiling this folder using the following command:
Produces the following error:
The text was updated successfully, but these errors were encountered: