qt: UnicodeParsedString support UTF16-LE strings

They are not part of the standard but Adobe seems to support them and
there's files out there like that so better to support them than not
diff --git a/qt5/src/poppler-private.cc b/qt5/src/poppler-private.cc
index 5f67397..b284a74 100644
--- a/qt5/src/poppler-private.cc
+++ b/qt5/src/poppler-private.cc
@@ -1,6 +1,6 @@
 /* poppler-private.cc: qt interface to poppler
  * Copyright (C) 2005, Net Integration Technologies, Inc.
- * Copyright (C) 2006, 2011, 2015, 2017, 2018 by Albert Astals Cid <aacid@kde.org>
+ * Copyright (C) 2006, 2011, 2015, 2017-2019 by Albert Astals Cid <aacid@kde.org>
  * Copyright (C) 2008, 2010, 2011, 2014 by Pino Toscano <pino@kde.org>
  * Copyright (C) 2013 by Thomas Freitag <Thomas.Freitag@alfa.de>
  * Copyright (C) 2013 Adrian Johnson <ajohnson@redneon.com>
@@ -108,12 +108,20 @@
         const char *cString;
         int stringLength;
         bool deleteCString;
-        if ( ( s1->getChar(0) & 0xff ) == 0xfe && ( s1->getLength() > 1 && ( s1->getChar(1) & 0xff ) == 0xff ) )
+        bool isLE = false;
+        if ( s1->hasUnicodeMarker() )
         {
             cString = s1->c_str();
             stringLength = s1->getLength();
             deleteCString = false;
         }
+        else if ( s1->hasUnicodeMarkerLE() )
+        {
+            isLE = true;
+            cString = s1->c_str();
+            stringLength = s1->getLength();
+            deleteCString = false;
+        }
         else
         {
             cString = pdfDocEncodingToUTF16(s1, &stringLength);
@@ -124,7 +132,8 @@
         // i = 2 to skip the unicode marker
         for ( int i = 2; i < stringLength; i += 2 )
         {
-            const Unicode u = ( ( cString[i] & 0xff ) << 8 ) | ( cString[i+1] & 0xff );
+            const Unicode u = isLE ? ( ( cString[i+1] & 0xff ) << 8 ) | ( cString[i] & 0xff )
+                                   : ( ( cString[i] & 0xff ) << 8 ) | ( cString[i+1] & 0xff );
             result += QChar( u );
         }
         if (deleteCString)
diff --git a/qt5/tests/check_strings.cpp b/qt5/tests/check_strings.cpp
index 583617a..e7b3f99 100644
--- a/qt5/tests/check_strings.cpp
+++ b/qt5/tests/check_strings.cpp
@@ -163,6 +163,8 @@
                                 << QStringLiteral("ša");
     QTest::newRow("test string") << newGooString("\xFE\xFF\0t\0e\0s\0t\0 \0s\0t\0r\0i\0n\0g", 24)
                                  << QStringLiteral("test string");
+    QTest::newRow("UTF16-LE") << newGooString("\xFF\xFE\xDA\x00\x6E\x00\xEE\x00\x63\x00\xF6\x00\x64\x00\xE9\x00\x51\x75", 18)
+                                 << QStringLiteral("Únîcödé畑");
 }
 
 void TestStrings::check_UnicodeParsedString()