Brian Candler <b.candler / pobox.com> wrote: > > and no need for ":encoding => "UTF-8"" when running as user. > > If you want the long answer to that question, see > http://github.com/candlerb/string19/blob/master/string19.rb > > The short answer is: (1) Ruby's behaviour when dealing with strings read > from files is influenced by the contents of environment variables, > unless you explicitly tell it otherwise; and (2) sudo clears out > environment variables, unless you explicitly tell it otherwise. > > > and notice that in both cases i do have : > > LANG => fr_FR.UTF-8 > > The rules for locale setting are complex, and there are other > environment variables such as LC_ALL which take precedence over it. See > 'man setlocale' ok, fine thanks ! -- C'est aujourd'hui que commence le reste de ta vie. ¥µ (Dale Carnegie)