views:

47

answers:

0

I was happily using Douglas Crockford's JSLint on Mac OS X and my code passes, but after I got a Ubuntu Hardy Slicehost server and uploaded my code there, the JSLint no longer passes when I try to run it on the server. It fails on my localized files that contain umlauts.

I get errors like:

Lint at line 1206 character 25: Unsafe character.
"PREVIOUS" : "zur??ck",

Lint at line 1207 character 26: Unsafe character.
"NEXTPAGE" : "vorw??rts",

The file hasn't changed, I checked the MD5 hash and they are same on both. This is how I run JSLint from my deployment script:

def lint_ok(fn):
    return os.system("java org.mozilla.javascript.tools.shell.Main jslint/jslint.js %s" % fn) == 0

Any ideas? What could be different? I checked the environment (env / set) and the only reference to character sets / encodings was "LC_CTYPE=UTF-8". I tried setting it to be the same but it seemed to have no effect.