still don't behave very sanely for multibyte encodings, but at least they won't be indexing off the ends of static arrays.