fbzhong/sublime-jslint — Issue #5: Running jslint with "UTF-8 with BOM"
Author: sebastienhiticas
Created: 2012-01-17 16:04:26+00:00
State: open

Hi,

First, thanks a lot for your work!

I tested your plugin and it seems to have a problem with file encoded with "UTF-8 with BOM". When I run it with file encoded with "UTF-8" it runs perfectly.

Here's what I got in the console :

DEBUG: java -jar "C:\Users\shiticas\AppData\Roaming\Sublime Text 2\Packages/sublime-jslint/jslint4java-2.0.1.jar" "C:\svn\MyProject\file.js"
Traceback (most recent call last):
File ".\jslint.py", line 69, in append_data
File ".\encodings\utf_8.py", line 16, in decode
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 90-92: invalid data

My project runs in VisualStudio 2010, but I use mainly Sublime to work. For whatever reason,some files are created with this encoding instead of just "UTF-8". For now, I can convert those files to be able to work with your plugin, but it would be awesome to have this fix!

Let me know if you need more details.

Thanks