import java.io.InputStream;\r
import java.io.OutputStream;\r
\r
-import org.marc4j.MarcReader;\r
import org.marc4j.MarcStreamReader;\r
import org.marc4j.MarcWriter;\r
import org.marc4j.MarcXmlWriter;\r
-import org.marc4j.converter.impl.AnselToUnicode;\r
import org.marc4j.marc.Record;\r
\r
/**\r
\r
public static void main(String args[]) throws Exception {\r
InputStream input; \r
- if (args.length > 0) \r
+ if (args.length > 0) {\r
input = new FileInputStream(new File(args[0]));\r
+ }\r
else \r
input = ReadMarcExample.class\r
.getResourceAsStream("resources/brkrtest.mrc");\r
\r
OutputStream out = System.out;\r
\r
- MarcReader reader = new MarcStreamReader(input);\r
+ MarcStreamReader reader = new MarcStreamReader(input, "MARC-8");\r
+ // Do not set bad indicators \r
+ reader.setBadIndicators(false);\r
MarcWriter writer = new MarcXmlWriter(out, true);\r
\r
- AnselToUnicode converter = new AnselToUnicode();\r
- writer.setConverter(converter);\r
+ //AnselToUnicode converter = new AnselToUnicode();\r
+ //writer.setConverter(converter);\r
\r
while (reader.hasNext()) {\r
Record record = reader.next();\r