title: How to set locale in the current terminal's session?
body: <p>I'm trying to change encoding in the urxvt current session by changing <code>LANG</code> variable. Howerever, it seems like it doesn't apply immediately. Here is what I do:</p>
  
  <p>Available locales:</p>
  
  <pre><code>$ locale -a
  C
  en_US.utf8
  POSIX
  ru_RU.koi8r
  ru_RU.utf8
  </code></pre>
  
  <p>Before setting new locale:</p>
  
  <pre><code>$ echo "а" | od -t x1
  0000000 d0 b0 0a # good! UTF-8
  #       | a ||NL|
  </code></pre>
  
  <p>After:</p>
  
  <pre><code>$ export LANG=ru_RU.KOI8-R
  $ echo "а" | od -t x1
  0000000 d0 b0 0a # hm..expect 'c1 0a'
  </code></pre>
  
  <p>Fork new urxvt instance by running <code>$ urxvt &amp;</code> and finally get what I want:</p>
  
  <pre><code>$ echo "а" | od -t x1
  0000000 c1 0a
  </code></pre>
  
  <p>Why doesn't <code>LANG</code> change the behavior in the first place?</p>