Java tutorial
import java.io.BufferedWriter; import java.io.FileOutputStream; import java.io.OutputStreamWriter; import java.io.Writer; public class Main { public static void main(String[] argv) throws Exception { Writer out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream("outfilename"), "8859_1")); out.write("asdf"); out.close(); } }