I’ve tracked down a problem with a Gem I am trying to use. It turns
out that it has some non-ascii characters in it; for example the
second quote in the regular expression below is not an ASCII character:
So is it considered best practice to put an encoding comment at the
begging of all your files now days? Such as:
encoding: utf-8
or whatever encoding you like. is this what people are doing or are
they doing it one off for the files that have non-ascii characters?
It seems to me that if you have a modern editor it isn’t too hard to
accidentally slip in some non-ascii characters resulting in some pain
down the road.
the road.
It isn’t hard to mess up any code in a lot of ways, so as usual, try
to run/test it before you release/deploy
That also means that using Ruby 1.9.1 for your daily coding might be a
better choice, otherwise you’ll have to use multiruby.
It seems to me that if you have a modern editor it isn’t too hard to
accidentally slip in some non-ascii characters resulting in some
pain down
the road.
It isn’t hard to mess up any code in a lot of ways, so as usual, try
to run/test it before you release/deploy
That also means that using Ruby 1.9.1 for your daily coding might be a
better choice, otherwise you’ll have to use multiruby.
With hoe, it’s as easy as:
multiruby_setup the_usual # only once
rake multi
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.