If you change the default encoding of the VM as I suggested above, console output is
in ascii. If you want to see it without downloading the server log file you can
convert the output stream to EBCDIC so that you can view it in a telnet console for
instance. You can pipe the output thru a filter program something like this. It also
works for nohup.out. In run.sh add:
org.jboss.Main "$@" \
| java -classpath . test.Convstream
| package test;
|
| // Convert from one encoding to another
|
| public class Convstream {
|
| public static void main(String[] args) {
|
| if (args.length == 1 && "-?".equals(args[0])) {
| System.out.println(System.getProperties());
| Object[] a =
| java.nio.charset.Charset.availableCharsets().values().toArray();
| for (int i = 0; i < a.length; i++)
| System.out.println(i + ": " + a);
| System.out.println("Syntax: <from-codepage> <to-codepage>");
| System.exit(0);
| }
|
| String cp1;
| String cp2;
|
| if (args.length < 2) {
| cp1 = "Cp1252"; // pc
| cp2 = "Cp1047"; // ebcdic (The IBM VM has this, but not the Sun one)
// or Cp500
| } else {
| cp1 = args[0];
| cp2 = args[1];
| }
|
| try {
|
| while (true) {
| int i = System.in.available();
| if (i == -1) break;
| if (i > 0) {
| byte [] b1 = new byte;
| System.in.read(b1);
| String s1 = new String(b1, cp1);
| byte[] b2 = s1.getBytes(cp2);
| System.out.write(b2);
| }
| Thread.sleep(100);
| }
|
| } catch (Exception e) {
| System.out.println(e);
| }
|
| }
|
| }
|
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3838535#3838535
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3838535
-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
>From Windows to Linux, servers to mobile, InstallShield X is the
one installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user