title: How to fix locale issue in Red Hat distro?
body: <p>I'm having a strange problem today in my RHEL system. My python script is returning:</p>
  
  <pre><code>&gt;&gt;&gt; locale.setlocale(locale.LC_ALL, '')
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "/usr/lib64/python2.6/locale.py", line 513, in setlocale
      return _setlocale(category, locale)
  locale.Error: unsupported locale setting
  </code></pre>
  
  <p>WHen I run...</p>
  
  <pre><code>$ locale
  </code></pre>
  
  <p>The ouput is...</p>
  
  <pre><code>locale: Cannot set LC_ALL to default locale: No such file or directory
  LANG=en_US.UTF-8
  LC_CTYPE="en_US.UTF-8"
  LC_NUMERIC="en_US.UTF-8"
  ...
  </code></pre>
  
  <p>I have been trying many suggestions but none of them solved my issue yet.</p>
  
  <p>For example:</p>
  
  <ul>
  <li>Reinstall glibc-common.</li>
  <li>Export LC_ALL as environment variable into ~/.bashrc.</li>
  <li>Change the file /etc/sysconfig/i18n'.</li>
  <li>locale-gen does not exists in RHEL.</li>
  </ul>
  
  <p>Does anyone has a good suggestion to solve my issue. Remembering that I'm using RHEL and not Ubuntu (there are many tutorials about locale issues and Ubuntu).</p>