0 Replies Latest reply on Oct 30, 2003 8:09 AM by ftg314159

    Web Console Scripting Failure under IBM z/OS Unix System Ser

    ftg314159

      When trying to run JBoss 3.2.1 under IBM's z/OS Unix System Services, I get a scripting failure during the initialization of web-console.war.

      The cause is code in org.jboss.console.plugins.helpers.BasePluginWrapper.loadScript() around line 171, which passes interpreter.eval a java.io.InputStreamReader which it creates from the InputStream of a URL representing a bsh script resource file.

      The problem is that the z/OS USS default platform encoding is Cp1047 (EBCDIC), but, by convention, text files within a JAR use UTF-8. Thus, the bytestream which is retrieved from url.openStream() is encoded as UTF-8, but the use of the InputStreamReader constructor without an explicit encoding causes InputStreamReader to assume that the bytes are encoded using the default platform encoding (Cp1047). Hence, the resulting Unicode is garbage.

      The fix is to change line 171 to use an explicit UTF8 encoding, as follows:

      // interpreter.eval (new java.io.InputStreamReader (url.openStream()));
      interpreter.eval (new java.io.InputStreamReader (url.openStream(),"UTF8"));

      I've tried this, and the code appears to work as intended.

      Please respond if this is not the appropriate forum to report bugs....thanks.