[DS-2196] License files do not support UTF-8 characters

This commit is contained in:
KevinVdV
2014-10-15 15:17:35 +02:00
parent 93c024bf89
commit d17fc2fa32
2 changed files with 2 additions and 2 deletions

View File

@@ -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");

View File

@@ -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);