summaryrefslogtreecommitdiffstats
path: root/config/environment.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-08-19 09:41:12 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-08-19 09:41:12 +0000
commitbbb6048f659825b3e7bf9baa03ec11425a5cdb34 (patch)
tree12fbb214a038b5f06813d437561d914f903021f8 /config/environment.rb
parent11dd4eb59158f1843cc1bce9e492b97e09f3716b (diff)
downloadredmine-bbb6048f659825b3e7bf9baa03ec11425a5cdb34.tar.gz
redmine-bbb6048f659825b3e7bf9baa03ec11425a5cdb34.zip
Ruby 1.9: set Encoding.default_external = 'UTF-8' (#4050).
Without this setting, Redmine cannot boot on Japanese Windows nor on non UTF-8 locale Linux (e.g. LANG=en_US.ISO-8859-1). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6461 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'config/environment.rb')
-rw-r--r--config/environment.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/config/environment.rb b/config/environment.rb
index 01377145a..3d4f1e80f 100644
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -7,6 +7,10 @@
# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.3.11' unless defined? RAILS_GEM_VERSION
+if RUBY_VERSION >= '1.9'
+ Encoding.default_external = 'UTF-8'
+end
+
# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')