Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to configure bash on Linux (red hat and ubuntu) to allow shell scripts to be encoded in UTF-8?

I can't find a simple way to change just one little thing and have the whole system just use UTF-8 files without having to worry about encoding.

share|improve this question
up vote 6 down vote accepted

I'm fairly sure bash pays attention to your locale setting, so if it's UTF-8, you should be good to go.

share|improve this answer

As long as you don't use the UTF-8 BOM, you should be ok.

share|improve this answer
Bizarre that UTF-8 permits a BOM (byte order mark) at start of file, but it's true: - as you imply, any use of this would confuse many applications such as shells. – RichVel Sep 5 '11 at 9:35

You shouldn't have to do anything, it's always worked automatically for me.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.