factory.setJavaEncoding(javaEncoding);
} catch (Throwable e) {
}
if (factory == null) {
factory = new JDKWriter();
String javaEncoding = Encoding.getJavaName(encoding);
if (javaEncoding == null)
javaEncoding = "ISO8859_1";
factory.setJavaEncoding(javaEncoding);