X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Forg%2Fmarc4j%2FMarcXmlWriter.java;fp=src%2Forg%2Fmarc4j%2FMarcXmlWriter.java;h=7e52fc23324485cc7cfb583151e7901b6952842f;hb=50f32ab70a47cf0d329bf65a596f94dbb413c76f;hp=a28981ad57afd24cb702416e320aead4f2766206;hpb=fa7e8c01ac0a2009caeca46135a0df80da2c2d52;p=marc4j.git diff --git a/src/org/marc4j/MarcXmlWriter.java b/src/org/marc4j/MarcXmlWriter.java index a28981a..7e52fc2 100644 --- a/src/org/marc4j/MarcXmlWriter.java +++ b/src/org/marc4j/MarcXmlWriter.java @@ -94,8 +94,8 @@ import com.ibm.icu.text.Normalizer; *

* In addition you can perform Unicode normalization. This is for example not * done by the MARC-8 to UCS/Unicode converter. With Unicode normalization text - * is transformed into the canonical composed form. For example "a´bc" - * is normalized to "ábc". To perform normalization set Unicode + * is transformed into the canonical composed form. For example "a�bc" + * is normalized to "�bc". To perform normalization set Unicode * normalization to true: *

* @@ -218,7 +218,7 @@ public class MarcXmlWriter implements MarcWriter { /** * Character encoding. Default is UTF-8. */ - private String encoding = "UTF8"; + //private String encoding = "UTF8"; private CharConverter converter = null; @@ -273,7 +273,7 @@ public class MarcXmlWriter implements MarcWriter { setIndent(indent); writer = new OutputStreamWriter(out, encoding); writer = new BufferedWriter(writer); - this.encoding = encoding; + // this.encoding = encoding; setHandler(new StreamResult(writer), null); } catch (UnsupportedEncodingException e) { throw new MarcException(e.getMessage(), e); @@ -487,9 +487,9 @@ public class MarcXmlWriter implements MarcWriter { handler.characters(temp, 0, temp.length); handler.endElement(Constants.MARCXML_NS_URI, LEADER, LEADER); - Iterator i = record.getControlFields().iterator(); - while (i.hasNext()) { - ControlField field = (ControlField) i.next(); + Iterator ci = record.getControlFields().iterator(); + while (ci.hasNext()) { + ControlField field = (ControlField) ci.next(); atts = new AttributesImpl(); atts.addAttribute("", "tag", "tag", "CDATA", field.getTag()); @@ -504,9 +504,9 @@ public class MarcXmlWriter implements MarcWriter { CONTROL_FIELD); } - i = record.getDataFields().iterator(); - while (i.hasNext()) { - DataField field = (DataField) i.next(); + Iterator di = record.getDataFields().iterator(); + while (di.hasNext()) { + DataField field = di.next(); atts = new AttributesImpl(); atts.addAttribute("", "tag", "tag", "CDATA", field.getTag()); atts.addAttribute("", "ind1", "ind1", "CDATA", String.valueOf(field @@ -519,9 +519,9 @@ public class MarcXmlWriter implements MarcWriter { handler.startElement(Constants.MARCXML_NS_URI, DATA_FIELD, DATA_FIELD, atts); - Iterator j = field.getSubfields().iterator(); - while (j.hasNext()) { - Subfield subfield = (Subfield) j.next(); + Iterator si = field.getSubfields().iterator(); + while (si.hasNext()) { + Subfield subfield = (Subfield) si.next(); atts = new AttributesImpl(); atts.addAttribute("", "code", "code", "CDATA", String .valueOf(subfield.getCode()));