Rails 3.1 (rc4), AJAX and UTF-8 -
i believe ok, creating question have answer other peoples benefit. problem:
i'm using remote link send request information , returning script containing information. data comes reason encoded in iso-8859-15 though have done find make rails & ruby use utf-8.
show.coffee
$('#messages_messages').html("<%= escape_javascript(render 'show') %>") # _show.html.erb create output characters such åäö
the response contains bunch of ?-characters instead of åäö.
for reason bug happens when using .coffee filename. solution:
don't use .coffee , end of filename. show.js.erb
$('#messages_messages').html("<%= escape_javascript(render 'show') %>"); # _show.html.erb create output characters such åäö
no encoding errors.
Comments
Post a Comment