tolk/tolk — pull request #30 by mangelajo (2013-02-15 17:17:27+00:00)
Title: Fixing encoding problems with forced encoding

I was finding an error like this after trying to export a .yml file, our DB had a couple of bad ascii characters in it.

rake aborted!
"\xC3" from ASCII-8BIT to UTF-8
/Users/ajo/.rvm/gems/ruby-1.9.3-p286/gems/tolk-1.3.5/app/models/tolk/locale.rb:62:in `block (2 levels) in dump_all'
/Users/ajo/.rvm/gems/ruby-1.9.3-p286/gems/tolk-1.3.5/app/models/tolk/locale.rb:56:in `open'
/Users/ajo/.rvm/gems/ruby-1.9.3-p286/gems/tolk-1.3.5/app/models/tolk/locale.rb:56:in `block in dump_all'
/Users/ajo/.rvm/gems/ruby-1.9.3-p286/gems/tolk-1.3.5/app/models/tolk/locale.rb:55:in `each'
/Users/ajo/.rvm/gems/ruby-1.9.3-p286/gems/tolk-1.3.5/app/models/tolk/locale.rb:55:in `dump_all'
/Users/ajo/.rvm/gems/ruby-1.9.3-p286/gems/tolk-1.3.5/lib/tasks/tolk_tasks.rake:24:in `block (2 levels) in '
Tasks: TOP => tolk:dump_all
(See full trace by running task with --trace)

output works, and looks fine after the patch.