Bug: if the text is not ASCII or unicode, then it does not act properly