parsetext: fix terminal being a multibyte character