Building in Docker causes Invalid US-ASCII character "\xF0"
See original GitHub issueIn this specific example I am using Docker (and jekyll) to build the site, but I believe the problem lies with the encoding the os in the Docker image is using. I am specifically using the ruby:2.6.5
docker image, but other images may provide the same error too.
What package(s) are you using?
-
carbon-components
-
carbon-components-react
Detailed description
The primary cause of this is the use of emoji’s in the scss comments.
Jekyll Feed: Generating feed for posts
Assets: Invalid US-ASCII character "\xF0"
Asset File /app/node_modules/carbon-components/scss/globals/scss/styles.scss:9
Liquid Exception: Sass Error in /_layouts/default.html
/usr/local/bundle/gems/jekyll-assets-3.0.12/lib/jekyll/assets/tag.rb:211:in `e_sass': Sass Error (Sass::SyntaxError)
The above error is specific for the globe emoji in the comments in styles.scss
Removing the emoji gets past the error, until the next file with an emoji is handled.
Is this issue related to a specific component?
Any component with emojis in the scss comments
What version of the Carbon Design System are you using?
"carbon-components": "^10.7.2"
Steps to reproduce the issue
- Clone from https://github.com/kabanero-io/kabanero-landing
- Comment out
ENV LANG C.UTF-8
in the Dockerfile - run
./ci/build.sh
- The error appears in the build. Uncomment the ENV line from step 2 and it will work successfully.
Additional information
This issue is more informational since the workaround/fix is to add that ENV var in the dockerfile for UTF-8 Encoding (see steps to reproduce). It might make sense to not include emojis in the scss comments as they do sometimes provide Docker build issues like this one and don’t really offer much value.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
Commenting again to highlight a workaround / fix
For my specific image,
ruby:2.6.5
I was able to add this env var to my Dockerfile before I built my siteThis allowed the build to understand the encoding of the emojis and build successfully.
Found from https://github.com/docker-library/docs/blob/master/ruby/content.md#encoding
@joshblack I believe so