0025608: TKernel, NCollection_UtfIterator - fix iteration of surrogate pairs in UTF-16
authorkgv <kgv@opencascade.com>
Sat, 13 Dec 2014 12:00:07 +0000 (15:00 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 25 Dec 2014 13:39:05 +0000 (16:39 +0300)
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)