I googled javascript to ruby utf-8 and this is the...
# suitescript
k
I googled javascript to ruby utf-8 and this is the one on the first page that looked most like your situation to me: http://andre.arko.net/2012/09/18/force-encoding-in-javascript/