sustained / CoffeeScript-Sublime-Plugin

Syntax highlighting and checking, commands, shortcuts, snippets, compilation and more.
MIT License
290 stars 71 forks source link

Fix to compile with multibyte characters #32

Open shirosaki opened 11 years ago

shirosaki commented 11 years ago

If a source file contains multibyte characters (Japanese characters), Check Syntax or Display JavaScript fails with UnicodeEncodeError on Windows. Adding encode/decode with utf-8 works without errors.

I got the following error messages with multibyte characters source file.

Traceback (most recent call last):
  File ".\sublime_plugin.py", line 356, in run_
  File ".\CoffeeScript.py", line 90, in run
  File ".\CoffeeScript.py", line 32, in brew
  File ".\CoffeeScript.py", line 14, in run
  File ".\subprocess.py", line 701, in communicate
  File ".\subprocess.py", line 911, in _communicate
UnicodeEncodeError: 'ascii' codec can't encode characters in position 21-23: ordinal not in range(128)
LYY commented 11 years ago

+1