Thursday, April 22, 2010

ทดสอบการใช้ Char Stream

// ThaiWrite.java

import java.io.*;

class ThaiWrite {

    public static void main(String args[]) throws IOException {

        // OutputStreamWriter osw = new OutputStreamWriter(System.out,"Cp1252");

        OutputStreamWriter osw = new OutputStreamWriter(System.out, "MS874");

        osw.write('\u0E01'); osw.write('');

        osw.close();

    }

}


 

Out ที่ได้คือ

กก

No comments:

Post a Comment