Jamie Hutber Jamie Hutber - 21 days ago 5
Sass (Sass) Question

Internal Error: Invalid UTF-8 - Sass & Gulp

I get the following error when trying to run

gulp sass
in Linux Ubuntu

hutber@hutber-ubuntu:/var/www/beta.norsemanfc.co.uk$ gulp sass
[14:43:26] Using gulpfile /var/www/beta.norsemanfc.co.uk/gulpfile.js
[14:43:26] Starting 'sass'...
[14:43:27] gulp-notify: [Compile Error] frontend/sass/style.scss
Internal Error: Invalid UTF-8

[14:43:27] Finished 'sass' after 547 ms


Searching through all the files/folders for any special characters returns nothing.

hutber@hutber-ubuntu:/var/www/beta.norsemanfc.co.uk$ find ./* -iregex '.*/.*[èö].*' -print


Otherwise if I remove the @import at the start of the file it will then fail on the @include border-box-sizing; as this is a variable from
susy


So of course how can I get sass running locally?

updated

hutber@hutber-ubuntu:/var/www/beta.norsemanfc.co.uk/frontend/sass$ find ./* | xargs grep -i '.*/.*[èö].*'
grep: ./fonts: Is a directory
grep: ./fonts/helvetica-neue: Is a directory
grep: ./modules: Is a directory
grep: ./modules/form: Is a directory
grep: ./pages: Is a directory
grep: ./plugins: Is a directory
grep: ./susy: Is a directory
grep: ./susy/susy: Is a directory
grep: ./susy/susy/language: Is a directory
grep: ./susy/susy/language/susy: Is a directory
grep: ./susy/susy/language/susyone: Is a directory
grep: ./susy/susy/su: Is a directory
grep: ./susy/susy/output: Is a directory
grep: ./susy/susy/output/support: Is a directory
grep: ./susy/susy/output/float: Is a directory
grep: ./susy/susy/output/shared: Is a directory


NB: Similar Question: Error "Invalid UTF-8" when compiling sass with @import
This is fixed by removing special charaters from the path, however all my folders are english and always have been.

Answer

You can try converting the file to ASCII and see if ? marks appears, those are the non UTF-8 ones:

cat your-file.css | iconv -f utf-8 -t ascii//TRANSLIT > ascii.css