instance method
initialize_encoding
Ruby on Rails 2.3.18
Since v2.2.3 Last seen in v2.3.18Available in: v2.2.3 v2.3.18
Signature
initialize_encoding()
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.
Source
# File railties/lib/initializer.rb, line 427
def initialize_encoding
$KCODE='u' if RUBY_VERSION < '1.9'
end
Defined in railties/lib/initializer.rb line 427
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Rails::Initializer