MNT-20626 XML files having UTF-16LE and UTF-16BE can't be previewed (#331)

* Introduce more flexible reading of UTF-16 data, where there may be a BOM, but the
   spec says there should not be one, or the BOM is clearly wrong when looking at the
   following characters. The https://en.wikipedia.org/wiki/UTF-16 write up is nice and clear.
* Includes identical correction in data setup in AIOTransformRegistryTest and
   MicsControllerTest for a problem found in TextToPdfContentTransformerTest.
 * Includes upgrade to latest pdfbox: 2.0.22
This commit is contained in:
Alan Davis
2021-02-09 19:04:34 +00:00
committed by GitHub
parent 97b9fc39cf
commit 2766c23431
4 changed files with 349 additions and 23 deletions

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Transform Core
* %%
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
@@ -280,7 +280,7 @@ public class AIOTransformRegistryTest
int cutoff = pageLimit * pageLength;
for (int i = 1; i <= lines; i++)
{
sb.append(i);
sb.append(Integer.toString(i));
sb.append(" I must not talk in class or feed my homework to my cat.\n");
if (i == cutoff)
checkText = sb.toString();