On Wed, Dec 26, 2012 at 6:28 PM, Shiv D. [email protected] wrote:
As it fixed issue with
bundle install at my local dev environment, it made
me wonder why is it not already done. So, I quickly created a branch and
pushed it to my forked rails repository.
This seems to be very trivial issue, but not fixed. I was going to make a
pull request but decided to post it here instead for more clarity. Should I
go ahead and make a pull request or is there something wrong with my local
It isn’t done because it shouldn’t have to be, it’s more or less your
systems job to inform Ruby what your encoding preference is. Even
though I would love to say that UTF-8 is the encoding for the entire
world I can’t and I can say that enforcing UTF-8 would be an
anti-pattern (to me) even if it’s the preferred. If you are on Linux
or Unix read the following… if you are on Windows you are on your
own because I know about as much about Windows as actually I don’t
really know much about Windows other than the lowlevel userland API’s.
[9:12:55] [email protected]:~ % export LANG=“en_US.BROKEN”
[9:13:00] [email protected]:~ % ruby -e ‘p ENCODING’
[9:13:02] [email protected]:~ % export LANG=“en_US.UTF-8”
[9:13:09] [email protected]:~ % ruby -e ‘p ENCODING’
[9:14:20] [email protected]:~ % export LANG=“en_US.BROKEN”
[9:14:24] [email protected]:~ % export LC_CTYPE=“en_US.UTF-8”
[9:14:31] [email protected]:~ % printenv |grep -P LANG|LC_
[9:14:50] [email protected]:~ % ruby -e ‘p ENCODING’
Make sure LANG and/or LC_CTYPE are set.
Some applications expect LC_CTYPE some expect LANG some will expect
either or and LC_CTYPE overrides LANG.