Skip to content

Commit

Permalink
Default $KCODE to 'u' to enable the multibyte-safe chars proxy. [Koz]
Browse files Browse the repository at this point in the history
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5319 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
NZKoz committed Oct 17, 2006
1 parent f366eb4 commit 301f721
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions railties/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*

* Set $KCODE to 'u' by default to enable the multibyte safe String#chars proxy. [Koz]

* Added config.plugins to control which plugins are loaded #6269 [skaes]. By default, everything in vendor/plugins will be loaded, but if you specify config.plugins, only those will be loaded. Example:

config.plugins = %w[ routing_navigator simply_helpful ]
Expand Down
8 changes: 8 additions & 0 deletions railties/lib/initializer.rb
Expand Up @@ -83,6 +83,7 @@ def process
set_autoload_paths
load_environment

initialize_encoding
initialize_database
initialize_logger
initialize_framework_logging
Expand Down Expand Up @@ -197,6 +198,13 @@ def load_observers
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
Expand Down

0 comments on commit 301f721

Please sign in to comment.