I was trying to send an http request in my controller to get the
content of the response and display it in a text field in the view,
but sometimes i got a “redundant UTF-8 sequence” exception. Even if
the exception was not raised, the chinese characters cannot be
properly displayed.What should I do?
On Mon, Mar 17, 2008 at 3:35 PM, phoenix [email protected] wrote:
I was trying to send an http request in my controller to get the
content of the response and display it in a text field in the view,
but sometimes i got a “redundant UTF-8 sequence” exception. Even if
the exception was not raised, the chinese characters cannot be
properly displayed.What should I do?
post your controller code…
Mikel
my action code:
def get_content
@url = params[:url]
response = Net::HTTP.get_response(URI.parse(@url))
@content = response.body
end