Set $KCODE to UTF-8 on Ruby 1.8 to mimic Rails 3 behavior

This commit is contained in:
Holger Just 2012-06-14 11:00:12 +02:00
parent 2f21522458
commit cd4efd2e0d
1 changed files with 3 additions and 0 deletions

View File

@ -24,9 +24,12 @@ ENV['RAILS_ENV'] ||= ENV['RACK_ENV'] if ENV['RACK_ENV']
# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.3.14' unless defined? RAILS_GEM_VERSION
# this is replaced by config.encoding = "utf-8" in rails3
if RUBY_VERSION >= '1.9'
Encoding.default_external = 'UTF-8'
Encoding.default_internal = 'UTF-8'
else
$KCODE='UTF-8'
end
# Bootstrap the Rails environment, frameworks, and default configuration