this does not take multibyte encodings into account