geocommons / geocoder

Modular Street Address Geocoder
http:///www.geocommons.com
GNU Lesser General Public License v3.0
395 stars 89 forks source link

constants.rb has multibyte characters #11

Closed donpdonp closed 15 years ago

donpdonp commented 15 years ago

ruby 1.9 chokes on constants.rb because two lines have unicode multibyte characters.

irb(main):001:0> require 'geocoder/us' WARNING: Couldn't find the fast C implementation of Levenshtein.distance. Using the much slower Ruby version instead. SyntaxError: /var/www/geocoder/geocoder/lib/geocoder/us/constants.rb:123: invalid multibyte char (US-ASCII) /var/www/geocoder/geocoder/lib/geocoder/us/constants.rb:123: invalid multibyte char (US-ASCII) /var/www/geocoder/geocoder/lib/geocoder/us/constants.rb:123: syntax error, unexpected $end, expecting tASSOC "Callejón" => "Callejón",

this can be fixed with the 'magic comment' for utf-8.

--- a/lib/geocoder/us/constants.rb +++ b/lib/geocoder/us/constants.rb @@ -1,3 +1,4 @@ +# coding: utf-8 require 'set' require 'geocoder/us/numbers'

donpdonp commented 15 years ago

i cannot figure out the silly markdown to make that look right. sorry.

wonderchook commented 15 years ago

Added the utf-8 'magic comment' tested with ruby 1.8.6 to make sure it didn't break it.