# Locale problems

**URL:** <https://talk.jekyllrb.com/t/locale-problems/1213>\
**Category:** Help\
**Created:** [November 29, 2017, 3:08am UTC](https://talk.jekyllrb.com/t/locale-problems/1213 "2017-11-29T03:08:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![thelonederanger](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/thelonederanger/32/611_2.png) [@thelonederanger](https://talk.jekyllrb.com/u/thelonederanger)\
**Post date:** [November 29, 2017, 3:08am UTC](https://talk.jekyllrb.com/t/locale-problems/1213/1 "2017-11-29T03:08:12Z")

</div>

My apologies in advance for what I’m sure will be a question with clarity proportional to my expertise.  
I have an OSx server upon which Jekyll and all it’s dependencies are installed. I want to be able to SSH in from any computer to make changes and rebuild the site.

If I attempt to rebuild the site without changing LANG to en\_US.UTF-8, the builder throws error:  
`Conversion error: Jekyll::Converters::Scss encountered an error while converting 'assets/css/main.scss': Invalid US-ASCII character "\xE2" on line 54`

I can manually change LANG by sending `export LANG=en_US.UTF-8` and then the site builds just fine.

SSH forces its locale on connection, but I disabled that by editing /etc/ssh/shh\_config and commenting out the line “SendEnv LANG LC\_\*”, and OSx is set to not reset the locale on startup. Nevertheless, the OSx defaults to “C” (eg LC\_CTYPE=“C” and so on), and I can’t seem to find any explanation of how to change this permanently. If you have any recommendation on that, then I’ll take it, but it seems to me that a better way to solve this might be simply to alter something in Jekyll. Part of the problem here is that I don’t fully understand how this locale thing works; if it’s by usergroup, session, etc, and when/how Jekyll is looking for it.

In main.scss (where the error originated) I do have `@charset "utf-8";` and in my \_config.yml I do have `locale: "en"`

Is there anywhere in yml/gem/scss/hades I can set locale lang to default to en\_US.UTF-8 and ignore the locale of the machine it’s building on?

Thanks in advance… Hope that made at least a little sense.

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [November 29, 2017, 4:05am UTC](https://talk.jekyllrb.com/t/locale-problems/1213/2 "2017-11-29T04:05:10Z")

</div>

no idea about controlling the locale on the server, but I do remember having that issue once. For me I ended up removing comments in the css - something about the css comment was causing it. The line nunber and the character it said it was were both incorrect if I remember correctly.

This thread has several solutions, including a line in config.yml:

> <https://github.com/jekyll/jekyll/issues/4268>

---

<div class="post-metadata">

**Author:** ![thelonederanger](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/thelonederanger/32/611_2.png) [@thelonederanger](https://talk.jekyllrb.com/u/thelonederanger)\
**Post date:** [November 29, 2017, 7:51pm UTC](https://talk.jekyllrb.com/t/locale-problems/1213/3 "2017-11-29T19:51:25Z")

</div>

Thanks for the reply!  
A friend guided me to a good workaround, so here it is for future users who might run into this problem.  
We edited the rakefile and added a build command that sets the LANG parameter for a one-off build.

In Rakefile:

```auto
task :build do
  system "env LANG=\"en_US.UTF-8\" bundle exec jekyll build"
end

```

then just run “rake build” instead of the usual “bundle exec jekyll build”
