why I get different result in different platform ?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   lai_ameng
Posted On:   Monday, April 29, 2002 02:55 AM

I execute following procedure in win2000 and Solaris platform respectively. I get corrent result file in win2000,but in Solaris,every chinese character is displayed as question mark.why? how can I do? import java.io.*; import java.util.Vector; public class Testor { PrintWriter os = null; public Testor(OutputStream outStream) { os = new PrintWriter(outStream); } public void outContentBody() { os.println("in os ÐÍÊä³öÁ÷"); //output chinese character os.flush(); } public static void main(String[] args) { try { FileOutputStream f = new FileOutputStream("testor.txt"); Testor testor = new Test   More>>

I execute following procedure in win2000 and Solaris platform respectively.
I get corrent result file in win2000,but in Solaris,every chinese
character is displayed as question mark.why? how can I do?


import java.io.*;
import java.util.Vector;
public class Testor {
PrintWriter os = null;

public Testor(OutputStream outStream) {
os = new PrintWriter(outStream);
}

public void outContentBody() {
os.println("in os ÐÍÊä³öÁ÷"); //output chinese character
os.flush();
}

public static void main(String[] args) {
try {
FileOutputStream f = new FileOutputStream("testor.txt");
Testor testor = new Testor(f);
testor.outContentBody();
f.close();
} catch(Exception ex) {
System.out.println(ex.toString());
}
}

}

   <<Less
About | Sitemap | Contact