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

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

php - How can I edit my code to echo the data of child's element where my search term was found in, in XMLReader? -