www.question-defense.com | Engage: Visit :: Login :: Register
Translate to English Übersetzen Sie zum Deutsch/German Переведите к русскому/Russian Μεταφράστε στα ελληνικά/Greek Vertaal aan het Nederlands/Dutch ترجمة الى العربية/Arabic 中文翻译/Chinese Traditional 中文翻译/Chinese Simplified 한국어에게 번역하십시오/Korean 日本語に翻訳しなさい /Japanese Traduza ao Português/Portuguese Traduca ad Italiano/Italian Traduisez au Français/French Traduzca al Español/Spanish

Posts Tagged “charset”

0

Ruby on Rails 1.2 and above automatically set a Content-type header including charset=UTF-8, which is well and good if you’re designing an application from scratch – JoelOnSoftware has a good introduction to character sets, for those who need a refresher – but breaks things in subtle ways if you are upgrading a legacy Rails 1.1 application. The (poorly documented at best) solution to this problem is to add a line to the config block of environment.rb to set config.action_controller.default_charset:

Rails::Initializer.run do |config|
  config.action_controller.default_charset = "iso-8859-1"
end
DeliciousStumbleUponDiggTwitterMixxTechnoratiFacebookNews VineLinkedInYahoo! Bookmarks
Tags: , , , ,

Comments No Comments »