mirror of
https://github.com/github/rails.git
synced 2026-02-10 22:25:02 -05:00
Ruby 1.9 compat: initializer only sets kcode for Ruby < 1.9
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8479 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -217,11 +217,15 @@ module Rails
|
||||
end
|
||||
end
|
||||
|
||||
# This initialization 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
|
||||
# For Ruby 1.8, this initialization 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.
|
||||
#
|
||||
# For Ruby 1.9, this does nothing. Specify the default encoding in the Ruby
|
||||
# shebang line if you don't want UTF-8.
|
||||
def initialize_encoding
|
||||
$KCODE='u'
|
||||
$KCODE='u' if RUBY_VERSION < '1.9'
|
||||
end
|
||||
|
||||
# This initialization routine does nothing unless <tt>:active_record</tt>
|
||||
|
||||
Reference in New Issue
Block a user