func pidx(a, b string) (i int, prefix string) {
	for ; i < len(a) && i < len(b) && a[i] == b[i]; i++ {
	}
	if i < 8 {
		return 0, ""
	}
	i -= 3  
	for k := i - 7; i > k && !utf8.RuneStart(a[i]); i-- {
	}
	return i, "..."
}
pidx finds the index from which two strings start to differ, plus context.
It returns the index and ellipsis if the index is greater than 0.
package norm
import (
	"bytes"
	"flag"
	"fmt"
	"io"
	"log"
	"strings"
	"testing"
	"unicode/utf8"
	"golang.org/x/text/internal/testtext"
	"golang.org/x/text/transform"
)
var (
	testn = flag.Int("testn", -1, "specific test number to run or -1 for all")
)
func pc(s string) []byte {
	b := bytes.NewBuffer(make([]byte, 0, len(s)))
	for i := 0; i < len(s); {
		r, sz := utf8.DecodeRuneInString(s[i:])
		n := 0
		if sz == 1 {
			for c := s[i]; i+n < len(s) && s[i+n] == c; n++ {
			}
		} else {
			for _, r2 := range s[i:] {
				if r2 != r {
					break
				}
				n++
			}
		}
		b.WriteString(s[i : i+sz])
		if n > 1 {
			fmt.Fprintf(b, "{%d}", n)
		}
		i += sz * n
	}
	return b.Bytes()
}