mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 18:14:26 +00:00
[DS-686] Incorrect use of UTF8 in DSpaceCSV
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@5377 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -79,7 +79,7 @@ public class DSpaceCSV
|
|||||||
private boolean exportAll;
|
private boolean exportAll;
|
||||||
|
|
||||||
/** A list of metadata elements to ignore */
|
/** A list of metadata elements to ignore */
|
||||||
private Hashtable ignore;
|
private Hashtable<String, String> ignore;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -109,7 +109,7 @@ public class DSpaceCSV
|
|||||||
init();
|
init();
|
||||||
|
|
||||||
// Open the CSV file
|
// Open the CSV file
|
||||||
BufferedReader input = new BufferedReader(new InputStreamReader(new FileInputStream(f),"UTF8"));
|
BufferedReader input = new BufferedReader(new InputStreamReader(new FileInputStream(f),"UTF-8"));
|
||||||
|
|
||||||
// Read the heading line
|
// Read the heading line
|
||||||
String head = input.readLine();
|
String head = input.readLine();
|
||||||
@@ -164,7 +164,7 @@ public class DSpaceCSV
|
|||||||
counter = 0;
|
counter = 0;
|
||||||
|
|
||||||
// Set the metadata fields to ignore
|
// Set the metadata fields to ignore
|
||||||
ignore = new Hashtable();
|
ignore = new Hashtable<String, String>();
|
||||||
String toIgnore = ConfigurationManager.getProperty("bulkedit.ignore-on-export");
|
String toIgnore = ConfigurationManager.getProperty("bulkedit.ignore-on-export");
|
||||||
if ((toIgnore == null) || ("".equals(toIgnore.trim())))
|
if ((toIgnore == null) || ("".equals(toIgnore.trim())))
|
||||||
{
|
{
|
||||||
@@ -401,7 +401,7 @@ public class DSpaceCSV
|
|||||||
catch (NumberFormatException nfe)
|
catch (NumberFormatException nfe)
|
||||||
{
|
{
|
||||||
System.err.println("Invalid item identifier: " + id);
|
System.err.println("Invalid item identifier: " + id);
|
||||||
System.err.println("Please check your CSV file for informaton. " +
|
System.err.println("Please check your CSV file for information. " +
|
||||||
"Item id must be numeric, or a '+' to add a new item");
|
"Item id must be numeric, or a '+' to add a new item");
|
||||||
throw(nfe);
|
throw(nfe);
|
||||||
}
|
}
|
||||||
@@ -485,7 +485,7 @@ public class DSpaceCSV
|
|||||||
// Save the file
|
// Save the file
|
||||||
BufferedWriter out = new BufferedWriter(
|
BufferedWriter out = new BufferedWriter(
|
||||||
new OutputStreamWriter(
|
new OutputStreamWriter(
|
||||||
new FileOutputStream(filename), "UTF8"));
|
new FileOutputStream(filename), "UTF-8"));
|
||||||
for (String csvLine : getCSVLinesAsStringArray()) {
|
for (String csvLine : getCSVLinesAsStringArray()) {
|
||||||
out.write(csvLine + "\n");
|
out.write(csvLine + "\n");
|
||||||
}
|
}
|
||||||
@@ -562,7 +562,7 @@ public class DSpaceCSV
|
|||||||
String filename = "test.csv";
|
String filename = "test.csv";
|
||||||
BufferedWriter out = new BufferedWriter(
|
BufferedWriter out = new BufferedWriter(
|
||||||
new OutputStreamWriter(
|
new OutputStreamWriter(
|
||||||
new FileOutputStream(filename), "UTF8"));
|
new FileOutputStream(filename), "UTF-8"));
|
||||||
for (String csvLine : csv) {
|
for (String csvLine : csv) {
|
||||||
out.write(csvLine + "\n");
|
out.write(csvLine + "\n");
|
||||||
}
|
}
|
||||||
|
@@ -25,6 +25,9 @@
|
|||||||
(Peter Dietz)
|
(Peter Dietz)
|
||||||
- [DS-549] Added <a name> anchors in XMLUI
|
- [DS-549] Added <a name> anchors in XMLUI
|
||||||
|
|
||||||
|
(Stuart Lewis, Christophe Dupriez)
|
||||||
|
- [DS-686] Incorrect use of UTF8 in DSpaceCSV
|
||||||
|
|
||||||
1.6.2
|
1.6.2
|
||||||
=====
|
=====
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user