Rails 3 invalid multibyte char (US-ASCII)
Instead of adding # coding: UTF-8
try to add # encoding: UTF-8
on the first line of the file.
It worked for me. I found the information here : http://groups.google.com/group/sinatrarb/browse_thread/thread/f92529bf0cf62015
Just add the following line as the first line in the file:
# -*- coding: utf-8 -*-
and it will work.
Add a magic comment in the script where you use non-ascii chars? It should go on top of the script.
# encoding: utf-8
It worked for me like charm.
Or if you want to make the project wide, you have an option of magic-encoding gem