aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2006-10-17 23:11:47 +0000
committerMichael Koziarski <michael@koziarski.com>2006-10-17 23:11:47 +0000
commit301f721ef874935e46019fa8a60401d822b5fa78 (patch)
tree001f43171e92d0fc2842bea5fde89c9037d422b5 /railties/lib
parentf366eb4b2d7bdf9d228aeb9baf221134cefac8f7 (diff)
downloadrails-301f721ef874935e46019fa8a60401d822b5fa78.tar.gz
rails-301f721ef874935e46019fa8a60401d822b5fa78.tar.bz2
rails-301f721ef874935e46019fa8a60401d822b5fa78.zip
Default $KCODE to 'u' to enable the multibyte-safe chars proxy. [Koz]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5319 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/initializer.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb
index 1400930768..ba651a2a03 100644
--- a/railties/lib/initializer.rb
+++ b/railties/lib/initializer.rb
@@ -83,6 +83,7 @@ module Rails
set_autoload_paths
load_environment
+ initialize_encoding
initialize_database
initialize_logger
initialize_framework_logging
@@ -197,6 +198,13 @@ module Rails
ActiveRecord::Base.instantiate_observers
end
+ # This initialzation sets $KCODE to 'u' to enable the multibyte safe operations.
+ # Plugin authors supporting other encodings should override this behaviour and
+ # set the relevant +default_charset+ on ActionController::Base
+ def initialize_encoding
+ $KCODE='u'
+ end
+
# This initialization routine does nothing unless <tt>:active_record</tt>
# is one of the frameworks to load (Configuration#frameworks). If it is,
# this sets the database configuration from Configuration#database_configuration