llloret / sonic-pi-vscode-editor

Use Sonic Pi from VS Code
Other
68 stars 15 forks source link

accepting multi-byte comment in code #11

Closed mogimogitomato closed 3 years ago

mogimogitomato commented 3 years ago

In the case code's comment include multibyte charset, running code get failed. Also, in sonic-pi's server execute force_encoding when receiving code. https://github.com/sonic-pi-net/sonic-pi/blob/main/app/server/ruby/bin/sonic-pi-server.rb#L338

So, I think code should have been converted to utf-8 before sending to sonic-pi.

ethancrawford commented 3 years ago

Nice work @mogimogitomato, thanks!