ascii codec cant encode character

fix bug in string handling