From e61e0793f45f52746ea02dc62fb9c3ef494622fc Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Mon, 25 Jun 2012 22:50:07 +0200 Subject: [PATCH] Default to UTF-8 instead of throwing exception --- src/org/marc4j/TurboMarcXmlWriter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 1.7.10.4