Set encoding database connections

Hi, I use AWS Opswork and its great service. It use chef for start and configure a new instance but I have a trouble.
Opswork create database.yml file with utf8 encoding parametr and its bad because right encoding for mysql is utfmb4 (for example utf8 not support Emoji smiles).
I send pull request for fix it Update database.yml.erb by achempion · Pull Request #56 · aws/opsworks-cookbooks · GitHub but it not merged yet.

Question:
How I can set encoding param into my rails application? Into config or may be into models. Any ideas?

We can change database.yml to other filename.
Paste it Into config/application.rb on line 11 (after define bundler)

module Rails
  class Application
    class Configuration < ::Rails::Engine::Configuration
      def paths
        @paths ||= begin
          paths = super
          paths.add "config/database",    with: "config/database_actual.yml"
          paths.add "config/environment", with: "config/environment.rb"
          paths.add "lib/templates"
          paths.add "log",                with: "log/#{Rails.env}.log"
          paths.add "public"
          paths.add "public/javascripts"
          paths.add "public/stylesheets"
          paths.add "tmp"
          paths
        end
      end
    end
  end
end

And move database.yml to config/database_actual.yml