Change 19648 by [EMAIL PROTECTED] on 2003/05/31 17:37:36

        Better patch from Inaba Hiroto for
        [perl #22375] 'split'/'index' problem for utf8

Affected files ...

... //depot/perl/sv.c#664 edit

Differences ...

==== //depot/perl/sv.c#664 (text) ====
Index: perl/sv.c
--- perl/sv.c#663~19645~        Fri May 30 22:37:10 2003
+++ perl/sv.c   Sat May 31 10:37:36 2003
@@ -5947,12 +5947,16 @@
 
                        while (backw--) {
                            p--;
-                           while (UTF8_IS_CONTINUATION(*p))
+                           while (UTF8_IS_CONTINUATION(*p)) {
                                p--;
+                               backw--;
+                           }
                            ubackw++;
                        }
 
                        cache[0] -= ubackw;
+                       *offsetp = cache[0];
+                       return;
                    }
                }
            }
End of Patch.

Reply via email to