The encoding of the ip address as returned by remote_ip() is ASCII-8BIT, 
and the encoding of the string literal '127.0.0.1' in rails 3.0.9 is 
US-ASCII.   You can demonstrate that by putting this in an action:

    @remote_ip = request.remote_ip
    @remote_ip_encoding = @remote_ip.encoding.name
    @str_literal_encoding = '127.0.0.1'.encoding.name

and then displaying the variables in a view.  ASCII-8BIT is a synonym 
for 'binary', i.e. unknown encoding.

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to