YUI Compressor String conversion problem
currently I am using the 开发者_JAVA百科YUI Compressor 2.4.6 to minify a JavaScript file containing special characters like \b
. If I test it locally there is no problem and everything works. Unfortunatly if I use it on the server (it is a Apache Tomcat 6.0.29) the compressor seems to missinterpret the characters. The result does not contain the String \b
but a new line. The same happens with other characters of that category. As you can imagine I would like to have the String in the result file instead of the new line.
Since it is not clear what causes the difference between local environment (using a main method) and the server my question is:
does anybody have a clue where the problem comes from or which aspects of the server could influence the YUI compressor?
well, problem found
A jar on the server contained a repackaged AND MODIFIED version of the rhino project which contained the parser for the js files. the classloader took the modified version instead of the one we provided. After making sure the correct version of the class was used everything was fine.
精彩评论