jikes and ISO-8859-1 encoding

X-Application Version: 3.1.3, 3.1.2, 3.1.1
Tamino Version : 3.1.1
Platform : NT, Win2k, Solaris, …
WebContainer : Tomcat 3.3
JDK Version : 1.3.1

Hello,
I am trying to speed up my application. I read in the x-application documentation that jikes could help.
So I downloaded jikes and followed the installation instructions:

Download and unpack jikes from http://ibm.com/developerworks/oss/jikes/ and add it to your system environment path.

Add the following code in the file Tomcat/conf/server.xml:

<JspInterceptor keepGenerated=“true”
javaCompiler=“jikes”
largeFile="false"
useJspServlet=“false”/>

After using jikes I can see some good improvements in speed, but it looks like the output from jikes is UTF-8 encoded but I use ISO-8859-1 encoding.

Do you know about any other configurations that I have to do besides changing the environment path and server.xml ?

Best regards
eagle

I don’t understand. Jikes outputs class files which are binary files. Class files are not subjects to UTF-8 or ISO encoding.

What is the “output” you’re refering to?

Michael

Software AG Germany, Darmstadt

Hello Michael,

I am talking about html output from jsp pages.
For example a simple jsp page which looks like this: (this is Hello World in Icelandic)


Halló

halló heimur



This output should print: “halló heimur” in a browser, but it prints: "halló heimur"

Hope this answers your question. If you have any other questions about this, please let me know.

Best regards
eagle

That means you have an encoding problem, not a jikes problem. Switching to jikes should not affect the encoding. What else did you change when you switched to jikes?

Michael

Software AG Germany, Darmstadt

Hello,

there is a chapter ‘Iternationalization’ under the topic ‘JavaServer Pages’ of X-Application’s documentations. Have a look at this small chapter and check

(a) your page directive for the encoding
(b) the default encoding of your Tomcat 3.3.1

The encoding of the page directive and the Tomcat should be the same and in your case ‘ISO-8859-1’.

Bye,
Christian.

I am pretty sure that this is the only thing I changed:


<JspInterceptor keepGenerated=“true”
largeFile=“false”
useJspServlet=“false”/>



<JspInterceptor keepGenerated=“true”
javaCompiler=“jikes”
largeFile=“false”
useJspServlet=“false”/>

eagle

Hello Christian,

I looked at the internationalization chapter in the x-application documentation.

I applied the 4 steps mentioned there, but no success.

Can you do me a favor and check if the simple helloworld example above works on your system.

Best regards
eagle

And does it work again if you revert this change?

Michael

Software AG Germany, Darmstadt

Yes, it works if I revert this change

eagle

I think I was wrong … Jikes could very well affect the character encoding: writing class files is not subject to character encoding as I wrote in my previous mail. However, I forgot that jikes has to read its source files with some encoding: reading java files is subject to character encoding!!

I think what happens on your machine is this: you have configured Tomcat to use UTF-8, thus it generates Java files with UTF-8 encoding. Then, Tomcat calls jikes to read these files, and jikes uses the machine’s default encoding to read the java files. The machine’s default encoding is not UTF-8, and as a consequence, the string constants in your Java files get corrupted.

If you invoke jikes from the command line, you can specify “-encoding utf8” to override the default encoding. Unfortunatly, I don’t know how to specify additional options when invoking jikes from withing Tomcat.

Anybody who knows how to specify additional options for jikes?


Michael

Software AG Germany, Darmstadt