Menu

#860 class file names don't interwork with other locales

open
open
nobody
5
2004-11-18
2004-11-18
Anonymous
No

Jikes generates class file names always in UTF-8, even when
compiling in ISO8859-1 source encoding mode.
As a consequence, java does not find the class files
in this environment.
Admittedly, it is disputable if class file names should be
unique in order to support running in sessions
with different encodings
(e.g. from different terminals) without recompilation.
But something should be done for proper interworking with java.

(jikes 118, jikes 122)

sample program:
public
class enc {

static class MüsliTask extends Thread {
private
void machMüsli () {
System.out.println ("mache Müsli");
}

public
void run () {
machMüsli ();
}
}

public static
void main (String [] argus) {
new MüsliTask ().start ();
}
}

This happens:
root@towo:~/opt/rt> LC_CTYPE=de_DE.iso8859-1
root@towo:~/opt/rt> jikes enc.java
root@towo:~/opt/rt> ls
enc$MĂźsliTask.class enc.class enc.java
root@towo:~/opt/rt> java enc
Exception in thread "main" java.lang.NoClassDefFoundError: enc$MüsliTask
at enc.main(enc.java:18)
root@towo:~/opt/rt> mv enc\$MĂźsliTask.class enc\$MüsliTask.class
root@towo:~/opt/rt> java enc
mache Müsli
root@towo:~/opt/rt>

Discussion


Log in to post a comment.