Skip to content

Commit

Permalink
convert from geoip lookup data to utf-8
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebaker committed May 22, 2013
1 parent 0674e11 commit 157ca1f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/models/session_info.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ def geolocate!(ip_address)
self.loc_info.delete(:request)
self.loc_info.delete(:ip)
self.loc_info.delete(:timezone)
self.loc_info[:region] = self.loc_info.delete(:region_name)
self.loc_info[:country_code] = self.loc_info.delete(:country_code2)
self.loc_info[:city] = self.loc_info.delete(:city_name)
self.loc_info[:region] = self.loc_info.delete(:region_name).encode('UTF-8', 'ISO-8859-1')
self.loc_info[:country_code] = self.loc_info.delete(:country_code2).encode('UTF-8', 'ISO-8859-1')
self.loc_info[:city] = self.loc_info.delete(:city_name).encode('UTF-8', 'ISO-8859-1')
end


Expand Down

0 comments on commit 157ca1f

Please sign in to comment.