mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Ruby 1.9: use UTF-8 for default internal and external encodings.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
*Edge*
|
||||
|
||||
* Ruby 1.9: use UTF-8 for default internal and external encodings. [Jeremy Kemper]
|
||||
|
||||
* Added db/seeds.rb as a default file for storing seed data for the database. Can be loaded with rake db:seed (or created alongside the db with db:setup). (This is also known as the "Stop Putting Gawd Damn Seed Data In Your Migrations" feature) [DHH]
|
||||
|
||||
|
||||
|
||||
@@ -426,10 +426,14 @@ Run `rake gems:install` to install the missing gems.
|
||||
# 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.
|
||||
# For Ruby 1.9, UTF-8 is the default internal and external encoding.
|
||||
def initialize_encoding
|
||||
$KCODE='u' if RUBY_VERSION < '1.9'
|
||||
if RUBY_VERSION < '1.9'
|
||||
$KCODE='u'
|
||||
else
|
||||
Encoding.default_internal = Encoding::UTF_8
|
||||
Encoding.default_external = Encoding::UTF_8
|
||||
end
|
||||
end
|
||||
|
||||
# This initialization routine does nothing unless <tt>:active_record</tt>
|
||||
|
||||
Reference in New Issue
Block a user