// Test case for http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=194522importjava.io.*;importjava.nio.charset.Charset;publicclassRH194522{publicstaticvoidmain(String[]args)throwsException{Charsetc=Charset.forName("UTF-8");ByteArrayOutputStreambaos=newByteArrayOutputStream();PrintWriterpw=newPrintWriter(newOutputStreamWriter(baos,c));pw.println("hi");pw.println("bob");pw.flush();pw.close();}}