work on issue #7: calculate byte offsets from rune offsets