14
Jun
Fix your encoding
June 14th, 2007 — 11:26 am —Everybody digs UTF-8, right? As of Rails 1.2, it’s the default encoding – which is fine and dandy if you’re into that whole unicode movement. Unfortunately, slate likes to eat characters one byte at a time. If your app is wearing 1.2.x clothing but still has the appetite of a 1.1.6 year-old, here’s how to fix it: add the following two lines to the end of the environment.rb file:
$KCODE = 'NONE' ActionController::Base.default_charset = 'ISO-8859-1'
Yummy – Ruby code and content, one byte at a time :-)
About slate
slate is a content management system (CMS) developed using Ruby on Rails focused on rapid production of traditional websites created by WVU Web Services. Read more about why we created slate and a longer list of features of slate. You can also check out a list of sites using slate. If you have questions or comments let us know but if it's a question about open sourcing slate have a look at this article first.Archives
Recent articles
- No Wonder Rails Is Default in Mac OS X Server...
- Good News: An Open Sourced slate Is Coming
- The WVU Open Source License
- Implementation idea: .do templates
- Keeping slate Humming - Part 1
- Campfire for Design & Keeping Your Tag Cloud Running
- Custom configuration settings made easy
- HOW-TO: Add a Gallery to Your Site
- JSONRequest.post Example
- Miscellaneous
Articles
Add comment
You are adding a new comment