mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-18 07:23:08 +00:00
[DS-2196] License files do not support UTF-8 characters
This commit is contained in:
@@ -129,7 +129,7 @@ public class LicenseUtils
|
|||||||
// + DCDate.getCurrent().toString() + " (GMT):\n\n" + license;
|
// + DCDate.getCurrent().toString() + " (GMT):\n\n" + license;
|
||||||
|
|
||||||
// Store text as a bitstream
|
// Store text as a bitstream
|
||||||
byte[] licenseBytes = licenseText.getBytes();
|
byte[] licenseBytes = licenseText.getBytes("UTF-8");
|
||||||
ByteArrayInputStream bais = new ByteArrayInputStream(licenseBytes);
|
ByteArrayInputStream bais = new ByteArrayInputStream(licenseBytes);
|
||||||
Bitstream b = item.createSingleBitstream(bais, "LICENSE");
|
Bitstream b = item.createSingleBitstream(bais, "LICENSE");
|
||||||
|
|
||||||
|
@@ -99,7 +99,7 @@ public class SimpleHTMLFragment extends AbstractWingElement {
|
|||||||
String xml = "<fragment>" + fragment + "</fragment>";
|
String xml = "<fragment>" + fragment + "</fragment>";
|
||||||
|
|
||||||
ByteArrayInputStream inputStream = new ByteArrayInputStream(xml
|
ByteArrayInputStream inputStream = new ByteArrayInputStream(xml
|
||||||
.getBytes());
|
.getBytes("UTF-8"));
|
||||||
|
|
||||||
SAXBuilder builder = new SAXBuilder();
|
SAXBuilder builder = new SAXBuilder();
|
||||||
Document document = builder.build(inputStream);
|
Document document = builder.build(inputStream);
|
||||||
|
Reference in New Issue
Block a user