refix: Syntax Checking: JavaScript: Ensure latin files are checked
https://bugs.activestate.com/show_bug.cgi?id=105635
* had to move encoding handling into the lint_with_text method

(integrated from master branch change 59a4394 by Todd Whiteman <toddw@activestate.com>)