Set $KCODE to UTF-8 on Ruby 1.8 to mimic Rails 3 behavior
This commit is contained in:
parent
645f44a419
commit
a91563e194
|
@ -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
|
# Specifies gem version of Rails to use when vendor/rails is not present
|
||||||
RAILS_GEM_VERSION = '2.3.14' unless defined? RAILS_GEM_VERSION
|
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'
|
if RUBY_VERSION >= '1.9'
|
||||||
Encoding.default_external = 'UTF-8'
|
Encoding.default_external = 'UTF-8'
|
||||||
Encoding.default_internal = 'UTF-8'
|
Encoding.default_internal = 'UTF-8'
|
||||||
|
else
|
||||||
|
$KCODE='UTF-8'
|
||||||
end
|
end
|
||||||
|
|
||||||
# Bootstrap the Rails environment, frameworks, and default configuration
|
# Bootstrap the Rails environment, frameworks, and default configuration
|
||||||
|
|
Loading…
Reference in New Issue