It looks like it is counting the number of bytes in the encoding used. For example, it looks like the second line takes two bytes per non-space character, while the first line takes three bytes per non-space character. I would expect:
echo strlen("ABCDEFGHI")
to print 17 - one byte per ASCII character.
My guess is that all of this uses UTF-8 encoding, which will undoubtedly fit the width of the view.
source share