hybridgroup / kidsruby

KidsRuby is a Ruby programming environment meant for kids to learn and have fun!
http://kidsruby.com
Other
333 stars 104 forks source link

support UTF-8 output for multiple languages #73

Closed silkycove closed 12 years ago

silkycove commented 12 years ago

Hi, I tried to puts a Japanese string (UTF-8) and it was not displayed on Output tab. I made some changes so that UTF-8 characters are correctly displayed on Output tab. Please review the changes and merge if possible. Changes: 1) Add a UTF-8 magic comment to kidcode.rb. Without the magic comment, kidcode.rb is terminated with an error such “unexpected '”. 2) Change unescape() to decodeURI() in updateStdOut(). unescape() seems not able to handle UTF-8 characters correctly. Characters are garbled on Output tab.