I'm trying to use a UTF8 string with accents in Opal.
Ruby Code:
test = "Français"
puts test
$document['#test'].inner_html = test
Compiled JavaScript :
test = "Fran\xC3\xA7ais";
self.$puts(test);
return (($a = [test]), $b = $gvars.document['$[]']("#test"), $b['$inner_html='].apply($b, $a), $a[$a.length-1]);
#test and browser console display :
Français
If I manually edit the compiled JavaScript replacing "Fran\xC3\xA7ais" by "Français" :
#test and browser console display :
Français
What am I doing wrong?
Is there a way to tell Opal to pass the UTF8 string untouched to JavaScript?
Thanks