Skip to content

Instantly share code, notes, and snippets.

@joel
Created October 19, 2012 12:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joel/3918080 to your computer and use it in GitHub Desktop.
Save joel/3918080 to your computer and use it in GitHub Desktop.
config.ru UTF-8
# Not override -E option or LANG and apply only for ruby > 1.9
if Object.const_defined?(:Encoding) && !ENV['LANG'] && !ENV['RUBYOPT'].include?('-E')
Encoding.default_internal = 'utf-8'
Encoding.default_external = 'utf-8'
end
require ::File.expand_path('../config/environment', __FILE__)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment