1 // Test case for http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=194522
2 
3 import java.io.*;
4 import java.nio.charset.Charset;
5 
6 public class RH194522
7 {
main(String[] args)8   public static void main(String[] args) throws Exception
9   {
10     Charset c = Charset.forName("UTF-8");
11     ByteArrayOutputStream baos = new ByteArrayOutputStream();
12     PrintWriter pw = new PrintWriter(new OutputStreamWriter(baos, c));
13     pw.println("hi");
14     pw.println("bob");
15     pw.flush();
16     pw.close();
17   }
18 }
19