capitaomorte/yasnippet — pull request #244 by darthdeus (2012-05-07 15:34:51+00:00)
Title: Set default Encoding to UTF_8 for Ruby 1.9

Running `rake convert_bundles` on Ruby 1.9 will cause `invalid byte sequence in US-ASCII` exception.

Converting from extras/bundles/html-tmbundle
./extras/textmate_import.rb -d extras/bundles/html-tmbundle -o ./extras/imported/html-mode -q
./extras/textmate_import.rb:362:in `split': invalid byte sequence in US-ASCII (ArgumentError)
from ./extras/textmate_import.rb:362:in `block in

'
from ./extras/textmate_import.rb:360:in `open'
from ./extras/textmate_import.rb:360:in `

'
rake aborted!
Command failed with status (1): [./extras/textmate_import.rb -d extras/bund...]

This is because Ruby 1.9 isn't reading files in UTF-8 by default and is dependent on system locale. Setting `Encoding.default_external = Encoding::UTF_8` fixes the issue.