Explorar o código

Merge pull request #5044 from AttilaVamos/HPCC-10247-improvement

HPCC-10247 This should convert field names from the source unicode encoding  (e.g., could be utf16)

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>
Gavin Halliday %!s(int64=11) %!d(string=hai) anos
pai
achega
5c23b6ead6
Modificáronse 1 ficheiros con 6 adicións e 2 borrados
  1. 6 2
      dali/ft/daftformat.cpp

+ 6 - 2
dali/ft/daftformat.cpp

@@ -904,8 +904,12 @@ void CUtfPartitioner::storeFieldName(const char * start, unsigned len)
 
     // Check the field name
     StringBuffer fieldName;
-    fieldName.append(start, 0, len);
-    fieldName.trim();
+    MemoryBuffer temp;
+    if (convertUtf(temp, UtfReader::Utf8, len, start, utfFormat))
+    {
+        fieldName.append(temp.length(), temp.toByteArray());
+        fieldName.trim();
+    }
 
     if (isRecordStructurePresent && (0 < fieldName.length() ))
     {