User-Agent: Opera/9.80 (X11; Linux x86_64; U; en) Presto/2.2.15 Version/10.10 Build Identifier: Rhino 1.7R2 2009-03-22 The method "evaluateString" doesn't evaluate string escapes correctly, "\n" should become line feed, "\t" should become tab, "\r" should become carriage return and "\\" should become "\" Reproducible: Always Steps to Reproduce: Context context = Context.enter(); ScriptableObject scope = context.initStandardObjects(); System.out.println( context.evaluateString(scope, "'test \\\\ \\n \\r \\t welt!';", "<cmd>", 1, null) ); Actual Results: "test \\ welt!" Expected Results: "test \\ \n \r \t welt!" Used the downloaded release JAR file from the rhino homepage.
sorry, little misstake, "Actual Results" are what I would expect and "Expected Results" are what is returned.
With both Rhino 1.7R2 and a recent CVS snapshot I get the following output, which is exactly what I'd expect: test \ welt! Closing as worksforme.
Thank you for the fast response! I finally found the reason after using the CVS snapshot. It was the "yuicompressor-2.4.2.jar" I'am using together with Rhino, after removing that thing everything works out well.