fix bug 1045303 - handle UTF-8 and control codes consistently

Now I'm very confused. Why do you expect this to become something else on line 154??