0025608: TKernel, NCollection_UtfIterator - fix iteration of surrogate pairs in UTF-16
[occt.git] / src / NCollection / NCollection_UtfIterator.lxx
index 9b0025b..9c66c05 100755 (executable)
@@ -114,7 +114,7 @@ void NCollection_UtfIterator<Type>::readUTF16()
   if (aChar >= UTF16_SURROGATE_HIGH_START
    && aChar <= UTF16_SURROGATE_HIGH_END)
   {
-    Standard_Utf32Char aChar2 = *myPosition;
+    const Standard_Utf32Char aChar2 = *myPosNext;
     // complete the surrogate pair
     if (aChar2 >= UTF16_SURROGATE_LOW_START
      && aChar2 <= UTF16_SURROGATE_LOW_END)