From: Dennis Schafroth Date: Mon, 25 Jun 2012 20:50:07 +0000 (+0200) Subject: Default to UTF-8 instead of throwing exception X-Git-Tag: v2.5~7 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=e61e0793f45f52746ea02dc62fb9c3ef494622fc;p=marc4j.git Default to UTF-8 instead of throwing exception --- diff --git a/src/org/marc4j/TurboMarcXmlWriter.java b/src/org/marc4j/TurboMarcXmlWriter.java index 8e89f5a..2645e79 100644 --- a/src/org/marc4j/TurboMarcXmlWriter.java +++ b/src/org/marc4j/TurboMarcXmlWriter.java @@ -275,7 +275,8 @@ public class TurboMarcXmlWriter implements MarcWriter { throw new NullPointerException("null OutputStream"); } if (encoding == null) { - throw new NullPointerException("null encoding"); + // Default to UTF-8 + encoding = "UTF8"; } try { setIndent(indent);