def iter_codepoint_indices_utf8(text):
    """
    Iterate over the byte offset of each character (UTF-8 only).
    """
    octets = text.encode('utf-8')
    for i, c in enumerate(octets):
        if not 128 <= c < 192:
            yield i
    yield len(octets)
