Open jlecour opened 13 years ago
I think I have this issue too.
Hey Jérémy and Paul,
Sorry I haven't commented on this sooner! I've been able to reproduce this locally, and keep circling back to it in hopes of fixing it. (I haven't yet, sadly.)
I believe the issue is with JSC -- when given a JS file with non-ASCII characters, it returns poorly encoded results. This part of the stack is even deeper than JSLint, JSHint, and the bundle itself.
I'll keep digging. Any ideas are appreciated!
Cheers, Ron
Some research in issue #9 considered using iconv
to convert the JS file from UTF-8 to ISO8859-1 (which JSC can supposedly handle), but it didn't fail gracefully enough on some characters.
node.js handles UTF-8 correctly. I created a very rough proof-of-concept patch that replaces jsc with the node.js runtime: https://github.com/die-antwort/jslintmate/compare/38ec6fd...die-antwort:nodejs-experimental
The patch works for me – unfortunately I don’t have enough time right now to do this in a clean way.
Interesting work, @noniq -- thanks for investigating!
One of the project goals is to work out of the box, so node.js won't become a dependency. However, I'd be open to defaulting to node.js by default, and using JSC as a fallback, if we can minimize the code differences across runners.
Possibly unrelated but, when using utf-8 characters (áíó and so on) in comments, the bundle in TM2 throws an 'Unsafe character' warning. JSLint.com, however, throws no errors. Awesome bundle, nevertheless, thanks!
I installed this plugin,and I find it's can't identifying information with encode UTF-8. my chinese code become mojibake.
I was encountering this issue. I just tried and implemented noniq's changes, solved my issue. Now that node has installers, and is much more likely to be on the user's system, that thing you said about node being the default but having a fallback seems quite desirable to me.
Thee is an issue with UTF-8 support.
I don't know if it's from the bundle or JSLint (and JSHint).
Here is a screenshot