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
Invalid US-ASCII character "\xE2" #4268
Comments
Try adding this to your _config.yml encoding: utf-8 This character is is â. Do you have any non-English characters in |
Happened again with the
assets/css/styles.scss ---
---
@charset "utf-8";
// Bourbon, Neat, Bitters, Base styles
@import "normalize";
@import "bourbon";
@import "neat";
@import "base/base"; |
Also hi @parkr! I ate lunch with you at Github Universe! |
For the record, I found this great one-liner for finding non-ASCII characters:
|
If you comment out all the |
Ok, so per the Sass documentation:
So it should assume UTF-8, so this character should not be a problem. Interesting issue, this is. Line three would be the line which contains
Hey man, thanks for stopping by Jekyll's issues! :) |
Nice to see a friendly face on the Internet now and again @parkr 👍 So just to follow up, I used that unicode character search and found just two lines where I could just replace them with ASCII equivalents. They were both comments anyway so nothing got hurt and I could build my Jekyll docker container. It'd probably be a lot more helpful for |
It may be an issue in Sass itself, as we output the line from the Sass error. If Sass passed us back the line in the imported file, then that would help a bit more, of course. Maybe |
I'm seeing this issue when using octopress on one of my machines but not the other. Haven't been able to figure out which possible variable is causing the issue on the erroring machine. edit: figured it out, the new linux machine didn't have it's locale set to utf-8 at a system level. After setting that, it works as expected |
Can somebody post the source of a site? I would like to investigate this issue |
I believe this issue is fixed in jekyll-sass-converter v1.4.0, which I just released. https://github.com/jekyll/jekyll-sass-converter/releases/tag/v1.4.0 |
I'm also having this issue. No problem if hosted via GitHub pages, but when I use docker on my own laptop or server, it has this issue. The problem is the
above the scss file. If you remove this, there would be no error but the scss will not be converted. Still don't know how to fix this. |
Did you upgrade your version of Jekyll-sass-converter? |
I tried. Same error. |
@AngeloAballe The YAML front matter (two lines of # Linux
grep --color='auto' -P -n "[\x80-\xFF]" file.xml
# Mac OS X after brew install pcre
pcregrep --color='auto' -n "[\x80-\xFF]" file.xml |
Thanks for the reply @parkr but after searching, I manage to fix it and I'm sharing my solution. I found out that the docker container is using a different charset or locale so you have to set it in you docker file. I manage to fix mine by adding this on my Dockerfile. No need to upgrade to sass converter 1.4.0.
Hope this helps everyone! |
hey @AngeloAballe if you are using the official Docker image can you push a ticket to https://github.com/jekyll/docker and we'll happily add that as a default, I didn't think Alpine lacked the default language vars (but I'm not surprised, it is an embedded OS.) |
Close: #2 Related: jekyll/jekyll#4268
Just for the future reference: I originally turned off |
I ran into this issue as well while trying to build my project over at GitLab. What was causing the issue was this bit of code:
The
|
I'm still getting this error on latest Jekyll. Check the CI log: https://gitlab.com/simonorono/simonorono.gitlab.io/builds/2904606 |
I get this problem when building a Jekyll site with |
Hey guys! I'm using Jekyll 3.3.0 and |
OK, seemed to be a Wercker runs fine now 😆 |
I also ran into this problem, and found this thread very helpful but it didn't cover my case. Hopefully this helps the next person. For me, setting
|
Suggestion from jekyll/jekyll#4268 (comment)
My jekyll build is being done by AWS CodeBuild, and I found I needed to add these lines to the pre_build:
commands:
- export LC_ALL="C.UTF-8"
- export LANG="en_US.UTF-8"
- export LANGUAGE="en_US.UTF-8"
|
If anyone is getting this on GitLab, add the list on the above ^ just put this in a |
I get this error in gitlab, @IotaSpencer Where to add the code. I dont find buildspec.yml file Edit: foud it it is in the .gtlab-ci.yml |
For Jekyll on Gitlab, alternative to @IotaSpencer's solution is adding them in variables, like:
|
Solution above looks good, I also got around it by putting an env assignment in my rake file. |
It seems this is an environment issue rather than a bug Jekyll could or should do something about. Maybe we could add some documentation regarding this? Otherwise, this issue should be closed. /cc: @jekyll/documentation |
If anyone on GitLab Pages is wondering why @reardestani 's solution does not work, there is a typo (a missing
Thanks everyone, I added those variables to my |
There's quite a few pages on the Internet talking about this problem with Ruby but none of the solutions seem to work with Jekyll. Ultimately, I'm trying to build a Jekyll site in a Docker container and I've tried setting
@charset
as well as all thelocale
ENV variables. is there something I can set in_config.yml
to solve this?The text was updated successfully, but these errors were encountered: